/* ============ 返回首页按钮 ============ */
.back-home-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.back-home-btn:hover {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
}

/* ============ 详情主体 ============ */
.detail-main {
  min-height: 60vh;
  padding: 32px 0 60px;
  background: var(--bg);
}

.detail-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ 加载状态 ============ */
.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: var(--text-light);
  font-size: 16px;
  gap: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ 详情头部 ============ */
.detail-header {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

/* 封面图：统一展示为1920×1080（16:9）比例 */
.detail-cover-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #e0e5ec, #f0f3f8);
}

.detail-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-cover-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, #e0e5ec, #f0f3f8);
}

.detail-info {
  padding: 28px 32px;
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-category {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.detail-time {
  font-size: 13px;
  color: var(--text-lighter);
}

.detail-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============ 资源图片区域 ============ */
.detail-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section-title .icon {
  font-size: 20px;
}

/* 资源图片：1:1正方形，半宽居中 */
.detail-resource-image-wrapper {
  width: 50%;
  margin: 0 auto;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.detail-resource-image-wrapper:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.detail-resource-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============ 备注说明 ============ */
.detail-remark {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

/* ============ 声明横幅（字体2倍） ============ */
.declaration-banner {
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 24px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 26px;
  color: #856404;
  line-height: 1.8;
}

.declaration-banner .decl-icon {
  font-size: 30px;
  margin-right: 4px;
}

/* ============ 404 状态 ============ */
.detail-notfound {
  text-align: center;
  padding: 80px 20px;
}

.detail-notfound .icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.detail-notfound h2 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

.detail-notfound p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.detail-notfound a {
  display: inline-block;
  padding: 10px 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: 20px;
  font-size: 14px;
  transition: var(--transition);
}

.detail-notfound a:hover {
  background: var(--primary-light);
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .detail-info {
    padding: 20px;
  }

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

  .detail-section {
    padding: 20px;
  }

  .detail-resource-image-wrapper {
    width: 80%;
  }

  .declaration-banner {
    padding: 16px 20px;
    font-size: 20px;
  }

  .declaration-banner .decl-icon {
    font-size: 24px;
  }
}
