﻿/* 资源分享页样式 */
.resources-header {
  padding: 120px 0 60px;
  background: var(--gradient-primary);
  color: var(--white);
  text-align: center;
}

.resources-header .page-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
}

.resources-header .page-subtitle {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.95;
}

.search-box {
  max-width: 600px;
  margin: 0 auto 24px;
  display: flex;
  gap: 12px;
}

.search-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 15px;
}

.search-input::placeholder {
  color: rgba(255,255,255,0.7);
}

.search-btn {
  padding: 14px 28px;
  background: var(--white);
  color: var(--primary-color);
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  cursor: pointer;
}

.resources-header .breadcrumb {
  justify-content: center;
}

/* 分类筛选 */
.categories-section {
  padding: 40px 0;
  background: var(--white);
  border-bottom: 1px solid #e2e8f0;
}

.categories-filter {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-btn {
  display: inline-block;
  padding: 12px 28px;
  background-color: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  visibility: visible;
  opacity: 1;
}

.category-btn:hover {
  background-color: rgba(27,78,143,0.1);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.category-btn.active {
  background: var(--gradient-primary);
  color: var(--white);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

/* 资源网格 */
.resources-grid-section {
  padding: 80px 0;
  background: var(--bg-color);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 60px;
}

/* 资源卡片 */
.resource-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.resource-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.resource-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.resource-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

@supports not (aspect-ratio: 3 / 2) {
  .resource-image {
    padding-top: 66.6667%;
  }

  .resource-image img {
    position: absolute;
    top: 0;
    left: 0;
  }
}

.resource-card:hover .resource-image img {
  transform: scale(1.1);
}

.resource-type-badge {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  z-index: 2;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(27,78,143,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--white);
  z-index: 2;
  opacity: 0.9;
  transition: all var(--transition-base);
}

.resource-card:hover .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.resource-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.resource-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resource-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.resource-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.resource-meta i {
  color: var(--primary-color);
}

.resource-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resource-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.download-btn {
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.play-btn {
  background: var(--gradient-accent);
  color: var(--white);
  border: none;
}

.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11,127,115,0.3);
}

.view-btn {
  background: var(--bg-color);
  color: var(--text-dark);
  border: 2px solid #e2e8f0;
}

.view-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 加载更多 */
.load-more-wrapper {
  text-align: center;
}

.load-more-btn {
  min-width: 200px;
}

/* 视频播放器 */
#videoModal .plyr {
  --plyr-color-main: var(--primary-color);
}

/* 响应式 */
@media (max-width: 1023px) {
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .resources-header {
    padding: 80px 0 40px;
  }
  
  .resources-header .page-title {
    font-size: 32px;
  }
  
  .categories-section {
    padding: 24px 0;
  }
  
  .categories-filter {
    gap: 8px;
  }
  
  .category-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .resources-grid-section {
    padding: 60px 0;
  }
  
  .resources-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
