/* ========== Tutorial List ========== */
.tutorial-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tutorial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.12);
}

.tutorial-card-cover {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  line-height: 1;
}

.tutorial-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tutorial-cover-1 { background: linear-gradient(135deg, #e8f0fe, #e8eaf6); }
.tutorial-cover-2 { background: linear-gradient(135deg, #e8f5e9, #e0f2f1); }
.tutorial-cover-3 { background: linear-gradient(135deg, #fff3e0, #fce4ec); }
.tutorial-cover-4 { background: linear-gradient(135deg, #f3e5f5, #ede7f6); }

.tutorial-card-body {
  padding: 16px;
}

.tutorial-card-body h4 {
  font-size: 15px;
  margin-bottom: 8px;
  line-height: 1.45;
}

.tutorial-card-body h4 a {
  color: var(--text);
  text-decoration: none;
}

.tutorial-card-body h4 a:hover {
  color: var(--primary);
}

.tutorial-card-body .summary {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  height: 40px;
  overflow: hidden;
  line-height: 1.55;
}

.tutorial-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== Tutorial Item Detail (课程详情式) ========== */
.tutorial-item-page {
  background: var(--bg-section);
  padding: 20px 0 48px;
  min-height: 60vh;
}

.tutorial-item-page .card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.item-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 8px 0;
}

.item-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.item-breadcrumb a:hover {
  color: var(--primary);
}

.item-breadcrumb .sep {
  margin: 0 8px;
  color: #ccc;
}

.item-breadcrumb .current {
  color: var(--text);
}

/* 顶部：封面 + 信息 */
.item-head {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  overflow: hidden;
  margin-bottom: 20px;
}

.item-cover-wrap {
  background: #f5f6f8;
  border-right: 1px solid var(--border);
}

.item-cover-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

.item-cover-placeholder {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f0f4f8 0%, #e8ecf1 100%);
}

.item-cover-emoji {
  font-size: 64px;
  line-height: 1;
  opacity: 0.85;
}

.item-info {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
}

.item-type {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}

.item-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin: 0 0 18px;
}

.item-meta-row {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.item-meta-row li {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.item-meta-row li:last-child {
  border-right: none;
}

.item-meta-row em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.item-meta-row strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.item-meta-row strong a {
  color: var(--primary);
  text-decoration: none;
}

.item-meta-row strong a:hover {
  text-decoration: underline;
}

.item-summary {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--bg-section);
  border-radius: var(--radius);
}

.item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.item-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

/* 下方：介绍 + 侧栏 */
.item-body-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.item-main {
  overflow: hidden;
}

.item-section-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.item-section-head h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

.item-content {
  padding: 28px 32px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.item-content h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.item-content h2:first-child {
  margin-top: 0;
}

.item-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 10px;
}

.item-content p {
  margin-bottom: 14px;
}

.item-content ul,
.item-content ol {
  margin-bottom: 14px;
  padding-left: 22px;
}

.item-content li {
  margin-bottom: 6px;
}

.item-content pre {
  background: #282c34;
  color: #abb2bf;
  padding: 16px 18px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.55;
}

.item-content code {
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.item-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.item-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 12px 0;
}

.item-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* 右侧信息面板 */
.item-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.info-panel {
  padding: 0;
  overflow: hidden;
}

.info-panel-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.info-dl {
  margin: 0;
  padding: 8px 0;
}

.info-dl dt {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 18px 4px;
  font-weight: normal;
}

.info-dl dd {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  padding: 0 18px 10px;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.5;
}

.info-dl dd:last-child {
  border-bottom: none;
}

.info-dl dd a {
  color: var(--primary);
  text-decoration: none;
}

.info-dl dd a:hover {
  text-decoration: underline;
}

.related-link-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.related-link-list li {
  border-bottom: 1px solid #f0f0f0;
}

.related-link-list li:last-child {
  border-bottom: none;
}

.related-link-list a {
  display: block;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.5;
}

.related-link-list a:hover {
  color: var(--primary);
  background: var(--bg-section);
}

@media (max-width: 992px) {
  .item-head {
    grid-template-columns: 1fr;
  }

  .item-cover-wrap {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .item-cover-img,
  .item-cover-placeholder {
    min-height: 200px;
  }

  .item-body-layout {
    grid-template-columns: 1fr;
  }

  .item-aside {
    position: static;
  }

  .item-meta-row li {
    min-width: 50%;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 576px) {
  .item-info {
    padding: 20px 16px;
  }

  .item-title {
    font-size: 20px;
  }

  .item-content {
    padding: 20px 16px;
  }

  .item-actions {
    flex-direction: column;
  }

  .item-actions .btn {
    width: 100%;
    text-align: center;
  }

  .item-meta-row li {
    min-width: 100%;
    border-right: none;
  }
}

