/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
/* 终端窗口样式 */
.terminal-window {
  width: 100%;
  max-width: 800px;
  height: 90vh;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  /* 平板设备 */
  /* 手机设备 */
  /* 超大屏幕优化 */
}
@media screen and (max-width: 768px) {
  .terminal-window {
    height: 90vh;
    border-radius: 8px;
  }
}
@media screen and (max-width: 480px) {
  .terminal-window {
    height: 100vh;
    border-radius: 0;
    max-width: none;
    box-shadow: none;
  }
}
@media screen and (min-width: 1200px) {
  .terminal-window {
    max-width: 1000px;
  }
}
/* 终端标题栏 */
.terminal-header {
  background: linear-gradient(to bottom, #e0e0e0, #ccc);
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  position: relative;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  /* 平板设备 */
  /* 手机设备 */
}
@media screen and (max-width: 768px) {
  .terminal-header {
    height: 25px;
  }
}
@media screen and (max-width: 480px) {
  .terminal-header {
    height: 22px;
    border-radius: 0;
  }
}
/* 控制按钮 */
.buttons {
  display: flex;
  gap: 8px;
}
.button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  /* 平板设备 */
  /* 手机设备 */
}
@media screen and (max-width: 768px) {
  .button {
    width: 10px;
    height: 10px;
  }
}
@media screen and (max-width: 480px) {
  .button {
    width: 8px;
    height: 8px;
  }
}
.close {
  background-color: #ff5f56;
}
.minimize {
  background-color: #ffbd2e;
}
.maximize {
  background-color: #27c93f;
}
.title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  color: #333;
  pointer-events: none;
  /* 平板设备 */
  /* 手机设备 */
}
@media screen and (max-width: 768px) {
  .title {
    font-size: 12px;
  }
}
@media screen and (max-width: 480px) {
  .title {
    font-size: 10px;
  }
}
/* 终端主体 */
.terminal-body {
  flex: 1;
  background-color: #000;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  /* 手机设备 */
}
@media screen and (max-width: 480px) {
  .terminal-body {
    padding: 10px;
  }
}
/* 终端内容区 */
.terminal-content {
  flex: 1;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 10px;
  user-select: text;
  /* 允许选择文本 */
  /* 平板设备 */
  /* 手机设备 */
  /* 超大屏幕优化 */
}
@media screen and (max-width: 768px) {
  .terminal-content {
    font-size: 14px;
  }
}
@media screen and (max-width: 480px) {
  .terminal-content {
    font-size: 12px;
  }
}
@media screen and (min-width: 1200px) {
  .terminal-content {
    font-size: 15px;
  }
}
.terminal-line {
  word-wrap: break-word;
  white-space: pre-wrap;
  user-select: text;
  /* 允许选择文本 */
}
/* Markdown 样式 */
.markdown {
  /* Markdown 表格样式 */
}
.markdown h1,
.markdown h2,
.markdown h3 {
  margin: 10px 0;
  font-weight: bold;
}
.markdown h1 {
  font-size: 1.5em;
  color: #fff;
}
.markdown h2 {
  font-size: 1.3em;
  color: #fff;
}
.markdown h3 {
  font-size: 1.1em;
  color: #fff;
}
.markdown p {
  margin: 8px 0;
}
.markdown ul,
.markdown ol {
  margin: 8px 0;
  padding-left: 20px;
}
.markdown li {
  margin: 1px 0;
}
.markdown code {
  background-color: #333;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}
.markdown pre {
  background-color: #222;
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 10px 0;
  position: relative;
  user-select: text;
  /* 允许选择代码块中的文本 */
  white-space: pre-wrap;
  /* 允许代码自动换行 */
  word-wrap: break-word;
  /* 在长单词或URL地址内部进行换行 */
  /* 代码块语言标识 */
  /* 代码块行号 */
}
.markdown pre::before {
  content: attr(data-language);
  position: absolute;
  top: 0;
  right: 0;
  background-color: #333;
  color: #fff;
  padding: 2px 8px;
  font-size: 12px;
  border-bottom-left-radius: 5px;
  text-transform: uppercase;
}
.markdown pre code {
  background: none;
  padding: 0;
  display: block;
  white-space: pre-wrap;
  /* 允许代码自动换行 */
  word-wrap: break-word;
  /* 在长单词或URL地址内部进行换行 */
}
.markdown pre.code-block-with-lines {
  padding-left: 50px;
}
.markdown pre.code-block-with-lines code {
  counter-reset: line;
}
.markdown pre.code-block-with-lines code .code-line {
  counter-increment: line;
  position: relative;
  padding-left: 10px;
  white-space: pre-wrap;
  /* 允许代码行自动换行 */
  word-wrap: break-word;
  /* 在长单词或URL地址内部进行换行 */
}
.markdown pre.code-block-with-lines code .code-line::before {
  content: counter(line);
  position: absolute;
  left: -50px;
  top: 0;
  width: 40px;
  text-align: right;
  color: #666;
  font-size: 12px;
}
.markdown blockquote {
  border-left: 3px solid #444;
  padding-left: 10px;
  margin: 10px 0;
  color: #aaa;
}
.markdown hr {
  border: none;
  border-top: 1px solid #444;
  margin: 15px 0;
}
.markdown .markdown-table {
  border-collapse: collapse;
  margin: 10px 0;
}
.markdown .markdown-table th,
.markdown .markdown-table td {
  border: 1px solid #444;
  padding: 8px 12px;
  text-align: left;
}
.markdown .markdown-table th {
  background-color: #222;
  font-weight: bold;
}
.markdown .markdown-table tr:nth-child(even) {
  background-color: #111;
}
.markdown .markdown-table tr:hover {
  background-color: #333;
}
/* 表单组样式 */
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.form-group .mac-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}
.form-group .mac-input:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}
.form-group .mac-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
}
.form-group .mac-textarea:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}
/* 滚动条样式 */
.terminal-body::-webkit-scrollbar,
.markdown pre::-webkit-scrollbar {
  width: 8px;
}
.terminal-body::-webkit-scrollbar-track,
.markdown pre::-webkit-scrollbar-track {
  background: #222;
}
.terminal-body::-webkit-scrollbar-thumb,
.markdown pre::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover,
.markdown pre::-webkit-scrollbar-thumb:hover {
  background: #777;
}
/* 输入行 */
.terminal-input-line {
  display: flex;
  color: #fff;
  font-size: 16px;
  align-items: center;
  /* 平板设备 */
  /* 手机设备 */
  /* 超大屏幕优化 */
}
@media screen and (max-width: 768px) {
  .terminal-input-line {
    font-size: 14px;
  }
}
@media screen and (max-width: 480px) {
  .terminal-input-line {
    font-size: 12px;
  }
}
@media screen and (min-width: 1200px) {
  .terminal-input-line {
    font-size: 16px;
  }
}
.prompt {
  margin-right: 10px;
  white-space: nowrap;
}
#commandInput {
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  flex: 1;
  outline: none;
  caret-color: #fff;
  /* 平板设备 */
  /* 手机设备 */
  /* 超大屏幕优化 */
}
@media screen and (max-width: 768px) {
  #commandInput {
    font-size: 14px;
  }
}
@media screen and (max-width: 480px) {
  #commandInput {
    font-size: 12px;
  }
}
@media screen and (min-width: 1200px) {
  #commandInput {
    font-size: 18px;
  }
}
