/* Contenedor principal del código */
.code-container {
  width: 100%;
  background-color: #0d0d0d;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  padding-top: 3rem;
}

/* Botón de Copiado */
.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 0.4rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.copy-btn:hover {
  background-color: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

.copy-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Estilos del área del código */
pre {
  margin: 0;
  padding: 0 0 1.5rem 0;
  overflow-x: auto;
}

code {
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 0.8;
  color: #e2e8f0;
  counter-reset: line;
  display: inline-block;
  min-width: 100%;
}

/* Estilos para cada línea */
.line {
  display: block;
  padding-right: 1rem;
  white-space: pre;
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.line:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Numeración automática con CSS */
.line::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 3rem;
  margin-right: 1.5rem;
  text-align: right;
  color: #475569;
  user-select: none;
}

/* Tokens de sintaxis */
.php-tag {
  color: #f472b6;
  font-weight: bold;
}

.keyword {
  color: #f87171;
}

.variable {
  color: #38bdf8;
}

.class {
  color: #fbbf24;
}

.function {
  color: #a78bfa;
}

.string {
  color: #34d399;
}

.number {
  color: #fb923c;
}

.comment {
  color: #6b7280;
  font-style: italic;
}