/* frontend/css/tutorials.css */

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.toc-link {
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 1.2rem;
  border-radius: 8px;
  text-align: center;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.toc-link span {
  font-size: 1.5rem;
}

.toc-link:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  border-color: var(--primary);
}

.tutorial-section {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  scroll-margin-top: 120px;
}

/* New: Highlight style for troubleshooting */
.tutorial-section.trouble-box {
  border-color: #ef444455; /* faint red border */
  background-color: #1f1212; /* very dark red bg tint */
}

.tutorial-section h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  color: var(--gold);
}

.step {
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.step-number {
  background-color: var(--gold);
  color: #000;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 1.1rem;
}

.step-content {
  flex: 1;
}

.step-content p {
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}

.tutorial-img {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  margin-top: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: #0b1120;
}

.code-box {
  background: #000;
  padding: 12px 16px; 
  border-radius: 6px; 
  color: var(--gold);
  font-family: monospace;
  font-size: 1.1rem;
  display: inline-block;
  margin-top: 0.5rem;
  border: 1px solid #333;
  user-select: text;
}