/* Resources Page Styles */
.resources-section {
  padding: 120px 0 80px;
  min-height: calc(100vh - 72px);
}

.resources-header {
  text-align: center;
  margin-bottom: 60px;
}

.resources-title {
  font-size: 48px;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.resources-description {
  font-size: 20px;
  color: #515154;
  font-weight: 400;
}

.resources-content {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 左侧栏目列表 */
.resource-categories {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  height: fit-content;
}

/* 板块组 */
.section-group {
  margin-bottom: 12px;
}

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

/* 板块标题 */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.section-header:hover {
  background: rgba(0, 0, 0, 0.03);
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5f5f7, #e8e8ed);
  flex-shrink: 0;
  color: #86868b;
  transition: all 0.2s ease;
}

.section-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
}

.section-arrow {
  width: 20px;
  height: 20px;
  color: #86868b;
  transition: transform 0.3s ease;
}

.section-header[aria-expanded="true"] .section-arrow {
  transform: rotate(180deg);
}

/* 板块内容项 */
.section-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 0 8px;
}

.section-items.expanded {
  max-height: 1000px;
  opacity: 1;
  padding: 8px 8px 0;
}

/* 子项 */
.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 6px;
  margin-left: 12px;
  border: 1px solid transparent;
}

.category-item:last-child {
  margin-bottom: 0;
}

.category-item:hover {
  background: rgba(0, 122, 255, 0.05);
}

.category-item.active {
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.1),
    rgba(0, 122, 255, 0.05)
  );
  border: 1px solid rgba(0, 122, 255, 0.2);
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5f5f7, #e8e8ed);
  flex-shrink: 0;
  color: #86868b;
  transition: all 0.2s ease;
}

.category-item.active .category-icon {
  background: linear-gradient(135deg, #007aff, #005bb5);
  color: white;
}

.category-info {
  flex: 1;
  min-width: 0;
}

.category-name {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 2px 0;
}

.category-desc {
  font-size: 12px;
  color: #86868b;
  margin: 0;
}

/* 空状态 */
.empty-state {
  padding: 20px;
  text-align: center;
  color: #86868b;
  font-size: 14px;
  margin-left: 12px;
}

/* 右侧内容详情 */
.resource-details {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  min-height: 500px;
}

.detail-header {
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.selected-category {
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 8px 0;
}

.selected-desc {
  font-size: 17px;
  color: #86868b;
  margin: 0;
}

.detail-container {
  min-height: 400px;
}

/* 变量参数表图片展示 */
.variables-images {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.variable-image-item {
  background: #f5f5f7;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.variable-image-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.variable-image-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 16px 0;
}

.variable-image-wrapper {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.variable-image {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.variable-image:hover {
  transform: scale(1.02);
}

/* PDF预览 */
.pdf-viewer {
  width: 100%;
  height: 800px;
  border: none;
  border-radius: 12px;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.pdf-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: #86868b;
  font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 968px) {
  .resources-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .resource-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
  }

  .category-item {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .resources-section {
    padding: 80px 0 60px;
  }

  .resources-title {
    font-size: 36px;
  }

  .resources-description {
    font-size: 18px;
  }

  .resource-details {
    padding: 24px;
  }

  .selected-category {
    font-size: 24px;
  }

  .pdf-viewer {
    height: 600px;
  }

  .resource-categories {
    grid-template-columns: 1fr;
  }
}

/* 论文列表骨架屏样式 */
.skeleton-paper-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.skeleton-paper-header {
  display: flex;
  align-items: start;
  gap: 16px;
}

.skeleton-paper-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

.skeleton-paper-content {
  flex: 1;
  min-width: 0;
}

.skeleton-paper-title {
  width: 80%;
  height: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.skeleton-paper-meta {
  display: flex;
  gap: 16px;
}

.skeleton-paper-meta-item {
  width: 80px;
  height: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-paper-button {
  flex-shrink: 0;
  width: 60px;
  height: 36px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 6px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
