/* ========== 教程详情页样式 ========== */

.tutorial-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}

/* 教程头部 */
.tp-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--card-border);
}

.tp-breadcrumb {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tp-breadcrumb a {
  color: var(--green-main);
  text-decoration: none;
  transition: color 0.2s;
}

.tp-breadcrumb a:hover {
  color: var(--green-dark);
}

.tp-breadcrumb .sep {
  color: var(--gray-400);
}

.tp-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--section-title);
  line-height: 1.4;
  margin-bottom: 12px;
  transition: color 0.3s;
}

.tp-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tp-meta-item {
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tp-meta-item strong {
  color: var(--green-main);
}

.tp-desc {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  transition: color 0.3s;
}

/* 教程章节 */
.tp-section {
  margin-bottom: 28px;
}

.tp-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--section-title);
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--green-main);
  line-height: 1.4;
  transition: color 0.3s;
}

.tp-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--section-title);
  margin: 20px 0 10px;
  transition: color 0.3s;
}

.tp-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 12px;
  transition: color 0.3s;
}

.tp-section ul, .tp-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.tp-section li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 6px;
  transition: color 0.3s;
}

/* 步骤卡片 */
.tp-step {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.3s;
}

.tp-step:hover {
  box-shadow: 0 4px 16px rgba(76,175,80,0.1);
  transform: translateY(-1px);
}

.tp-step-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-main));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.tp-step-content {
  flex: 1;
}

.tp-step-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--section-title);
  margin-bottom: 6px;
  transition: color 0.3s;
}

.tp-step-content p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 4px;
}

/* 提示框 */
.tp-tip {
  background: linear-gradient(135deg, rgba(76,175,80,0.08), rgba(76,175,80,0.03));
  border: 1px solid rgba(76,175,80,0.2);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.tp-tip-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.tp-tip-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-700);
}

/* 警告框 */
.tp-warn {
  background: linear-gradient(135deg, rgba(255,152,0,0.08), rgba(255,152,0,0.03));
  border: 1px solid rgba(255,152,0,0.2);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* 代码/提示词框 */
.tp-prompt {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-700);
  white-space: pre-wrap;
  word-break: break-all;
  border-left: 3px solid var(--green-main);
  transition: all 0.3s;
}

.tp-prompt-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-main);
  margin-bottom: 6px;
  font-family: inherit;
}

/* 工具卡片 */
.tp-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tp-tool-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.3s;
}

.tp-tool-card:hover {
  box-shadow: 0 4px 16px rgba(76,175,80,0.1);
  transform: translateY(-1px);
}

.tp-tool-emoji {
  font-size: 28px;
  flex-shrink: 0;
}

.tp-tool-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--section-title);
  margin-bottom: 2px;
}

.tp-tool-info p {
  font-size: 12px;
  color: var(--gray-500);
  margin: 0;
}

.tp-tool-tag {
  font-size: 11px;
  background: rgba(76,175,80,0.1);
  color: var(--green-main);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

/* FAQ */
.tp-faq {
  margin-bottom: 14px;
}

.tp-faq-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--section-title);
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
  transition: color 0.3s;
}

.tp-faq-q::before {
  content: 'Q';
  position: absolute;
  left: 0;
  color: var(--green-main);
  font-weight: 700;
}

.tp-faq-a {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-600);
  padding-left: 16px;
  margin-bottom: 8px;
}

/* 上下教程导航 */
.tp-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
}

.tp-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  flex: 1;
}

.tp-nav-btn:hover {
  border-color: var(--green-main);
  color: var(--green-main);
  box-shadow: 0 4px 16px rgba(76,175,80,0.1);
}

.tp-nav-btn.prev { justify-content: flex-start; }
.tp-nav-btn.next { justify-content: flex-end; text-align: right; }

.tp-nav-btn .nav-label {
  font-size: 11px;
  color: var(--gray-400);
  display: block;
}

/* 响应式 */
@media (max-width: 768px) {
  .tutorial-page { padding: 16px 16px 40px; }
  .tp-title { font-size: 20px; }
  .tp-section h2 { font-size: 17px; }
  .tp-tool-grid { grid-template-columns: 1fr; }
  .tp-nav { flex-direction: column; }
  .tp-nav-btn { text-align: center; justify-content: center; }
  .tp-meta { gap: 10px; }
}

/* 暗色模式适配 */
[data-theme="dark"] .tp-step {
  background: rgba(30, 30, 50, 0.5);
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .tp-tip {
  background: rgba(76,175,80,0.08);
  border-color: rgba(76,175,80,0.15);
}

[data-theme="dark"] .tp-warn {
  background: rgba(255,152,0,0.06);
  border-color: rgba(255,152,0,0.15);
}

[data-theme="dark"] .tp-prompt {
  background: rgba(30, 30, 50, 0.5);
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .tp-tool-card {
  background: rgba(30, 30, 50, 0.5);
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .tp-nav-btn {
  background: rgba(30, 30, 50, 0.5);
  border-color: rgba(255,255,255,0.06);
}
