.code-block {
  margin: 1em 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-family: monospace;
  font-size: 14px;
  line-height: 1.5;
}

.dark-mode .code-block {
  border-color: rgba(255, 255, 255, 0.1);
}

.code-block pre {
  margin: 0;
  padding: 1em;
  background: transparent;
  border: none;
  overflow-x: visible;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block pre code {
  display: block;
  font-family: monospace;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 4;
  background: transparent;
}

.dark-mode .code-block pre code {
  color: #d4d4d4;
}

.light-mode .code-block pre code {
  color: #24292e;
}

.dark-mode .code-block {
  color: #d4d4d4;
  background: #1e1e1e;
}

.light-mode .code-block {
  color: #24292e;
  background: #f6f8fa;
}

.message-content pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.message-content pre code {
  white-space: pre-wrap !important;
  word-break: break-word;
  tab-size: 4;
}

.pre-with-copy {
  position: relative;
}

.pre-with-copy .copy-button-wrapper {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 10;
  opacity: 0.7;
}

.pre-with-copy .copy-button-wrapper:hover {
  opacity: 1;
}

.regular-copy-button {
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.dark-mode .regular-copy-button {
  background: rgba(255, 255, 255, 0.1);
}

.regular-copy-button .material-symbols-outlined {
  font-size: 1.2em;
  color: #555;
}

.dark-mode .regular-copy-button .material-symbols-outlined {
  color: #ccc;
}

.inline-code-file {
  display: inline-flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
}

.dark-mode .inline-code-file {
  background-color: rgba(255, 255, 255, 0.1);
}

.inline-download-button {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 4px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  opacity: 0.7;
}

.inline-download-button:hover {
  opacity: 1;
}

.inline-download-button .material-symbols-outlined {
  font-size: 1em;
}

.code-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 0.9em;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background-color: rgba(0, 0, 0, 0.05);
  color: #555;
  font-family: monospace;
}

.light-mode .code-file-info {
  background-color: #f0f0f0;
  color: #333;
  border-top: 1px solid #ddd;
}

.dark-mode .code-file-info {
  background-color: #2d2d2d;
  color: #ccc;
  border-top: 1px solid #444;
}

.file-extension {
  font-weight: bold;
  margin-left: 4px;
}
