/* ========== EXAMPLE PAGE HEADER ========== */
.example-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.example-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 12px;
  line-height: 1.35;
}

.example-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========== SECTION BLOCKS ========== */
.section-block {
  background: var(--color-bg-card);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 24px;
}

.section-block h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent-light);
}

.section-block p {
  color: var(--color-text-secondary);
  margin-bottom: 10px;
  line-height: 1.8;
}

.section-block p:last-child {
  margin-bottom: 0;
}

.section-block ul {
  padding-left: 22px;
  color: var(--color-text-secondary);
}

.section-block ul li {
  margin-bottom: 6px;
  line-height: 1.7;
}

/* ========== DEMO SECTION ========== */
.demo-container {
  padding: 36px 24px;
  background: var(--color-bg);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 200px;
}

/* ========== SOURCE TABS ========== */
.tab-wrapper {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 0;
}

.tab-btn {
  padding: 9px 22px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover {
  color: var(--color-accent);
}

.tab-btn.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.tab-content {
  display: none;
  position: relative;
}

.tab-content.active {
  display: block;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  font-weight: 500;
  color: #ccc;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.tab-content pre {
  margin: 0;
  border-radius: 0 0 8px 8px;
  max-height: 420px;
  overflow-y: auto;
}

.tab-content pre code.hljs {
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.65;
  border-radius: 0 0 8px 8px;
}

/* ========== AI PROMPT SECTION ========== */
.prompt-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: 14px;
}

.prompt-wrapper {
  position: relative;
}

.prompt-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  font-weight: 500;
  color: #ccc;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s;
}

.prompt-copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.prompt-content {
  background: #1E2433;
  border-radius: 8px;
  padding: 20px 20px 20px 20px;
  overflow-x: auto;
  margin: 0;
}

.prompt-content code {
  font-family: var(--font-code);
  font-size: 13px;
  color: #CBD5E1;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
}

/* ========== RELATED SECTION ========== */
.related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-list li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color 0.15s;
}

.related-list li a::before {
  content: '→';
  font-size: 12px;
}

.related-list li a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .section-block {
    padding: 20px 16px;
  }

  .demo-container {
    padding: 24px 16px;
  }
}
