/* PrismJS 1.29.0 - Dark Theme for Code Highlighting */
code[class*="language-"],
pre[class*="language-"] {
  color: #e2e8f0;
  background: none;
  font-family: 'Fira Code', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-feature-settings: normal;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.5;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: 1.5rem;
  margin: 2rem 0;
  overflow: auto;
  border-radius: 0.75rem;
  background: #1a202c;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
  background: #1a202c;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  white-space: normal;
}

/* Tokens */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #718096;
  font-style: italic;
}

.token.punctuation {
  color: #a0aec0;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #ff79e6;
}

.token.boolean,
.token.number {
  color: #a6f0fc;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #68d391;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: #fbb6ce;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
  color: #ffd93d;
}

.token.keyword {
  color: #ff79e6;
  font-weight: 600;
}

.token.regex,
.token.important {
  color: #fbb6ce;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

/* Language-specific highlighting */
.language-javascript .token.template-string {
  color: #68d391;
}

.language-javascript .token.template-punctuation {
  color: #ff79e6;
}

.language-css .token.property {
  color: #a6f0fc;
}

.language-css .token.selector {
  color: #ffd93d;
}

.language-html .token.tag .token.tag {
  color: #ff79e6;
}

.language-html .token.tag .token.punctuation {
  color: #a0aec0;
}

.language-html .token.attr-name {
  color: #ffd93d;
}

.language-html .token.attr-value {
  color: #68d391;
}

/* Line highlighting */
.line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  padding: inherit 0;
  margin-top: 1em;
  background: rgba(255, 175, 243, 0.1);
  background: linear-gradient(to right, rgba(255, 175, 243, 0.1) 70%, rgba(255, 175, 243, 0));
  pointer-events: none;
  line-height: inherit;
  white-space: pre;
}

/* Line numbers */
.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -3.8em;
  width: 3em;
  letter-spacing: -1px;
  border-right: 1px solid #2d3748;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.line-numbers-rows > span {
  display: block;
  counter-increment: linenumber;
}

.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: #718096;
  display: block;
  padding-right: 0.8em;
  text-align: right;
}

/* Copy button styling */
.code-toolbar {
  position: relative;
}

.code-toolbar > .toolbar {
  position: absolute;
  top: 0.3em;
  right: 0.2em;
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
}

.code-toolbar:hover > .toolbar {
  opacity: 1;
}

.code-toolbar > .toolbar .toolbar-item {
  display: inline-block;
}

.code-toolbar > .toolbar a {
  cursor: pointer;
}

.code-toolbar > .toolbar button {
  background: #2d3748;
  border: 1px solid #4a5568;
  border-radius: 0.375rem;
  color: #e2e8f0;
  font: inherit;
  line-height: normal;
  overflow: visible;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.code-toolbar > .toolbar button:hover,
.code-toolbar > .toolbar button:focus {
  background: #4a5568;
  color: #ff79e6;
}

/* Scrollbar styling for code blocks */
pre[class*="language-"]::-webkit-scrollbar {
  height: 8px;
}

pre[class*="language-"]::-webkit-scrollbar-track {
  background: #2d3748;
  border-radius: 4px;
}

pre[class*="language-"]::-webkit-scrollbar-thumb {
  background: #4a5568;
  border-radius: 4px;
}

pre[class*="language-"]::-webkit-scrollbar-thumb:hover {
  background: #718096;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  pre[class*="language-"] {
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
  }
  
  .code-toolbar > .toolbar {
    top: 0.5rem;
    right: 0.5rem;
  }
}
