/* Fagaoren Media List - Top-Middle-Bottom Layout (like goodmt.cn) */

/* ===== Filter Area (Full-width, top) ===== */
.filter-area {
  background: #fff;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.filter-sidebar {
  background: #fff;
  padding: 0;
}

.filter-group {
  margin-bottom: 0;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  width: 80px;
  flex-shrink: 0;
  text-align: right;
  line-height: 26px;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  color: #666;
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid #e0e0e0;
}

.filter-tag:hover {
  color: #2563EB;
  border-color: #2563EB;
}

.filter-tag.active {
  color: #2563EB;
  background: #e8f0fe;
  border-color: #2563EB;
  font-weight: 500;
}

/* ===== Results Area (middle) ===== */
.results-area {
  background: #f5f7fa;
  padding: 16px 0 40px;
}

/* Sort bar */
.sort-bar {
  background: #fff;
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sort-options {
  display: flex;
  gap: 4px;
}

.sort-btn {
  padding: 5px 14px;
  font-size: 13px;
  color: #666;
  background: #f5f5f5;
  border-radius: 3px;
  cursor: pointer;
}

.sort-btn:hover {
  color: #2563EB;
}

.sort-btn.active {
  color: #2563EB;
  background: #e8f0fe;
  font-weight: 500;
}

.result-count {
  font-size: 13px;
  color: #999;
}

/* Resource Card - Table row style like goodmt.cn */
.resource-card {
  background: #fff;
  padding: 14px 20px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.resource-card:first-child {
  border-radius: 6px 6px 0 0;
}

.resource-card:last-child {
  border-radius: 0 0 6px 6px;
  border-bottom: none;
}

.resource-card:hover {
  background: #f8fbff;
}

.resource-card.hidden {
  display: none;
}

.resource-card-name {
  font-size: 15px;
  color: #333;
  flex: 1;
  min-width: 0;
}

.resource-card-name a {
  color: #1a1a1a;
  text-decoration: none;
}

.resource-card-name a:hover {
  color: #2563EB;
}

.resource-card-tags {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.resource-card-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 2px;
}

.tag-blue { background: #e8f0fe; color: #2563EB; }
.tag-green { background: #e6f9e6; color: #16a34a; }
.tag-orange { background: #fef3e6; color: #ea580c; }
.tag-gray { background: #f0f0f0; color: #666; }
.tag-red { background: #fee2e2; color: #dc2626; }

.resource-card-price {
  font-size: 16px;
  font-weight: 700;
  color: #ea580c;
  flex-shrink: 0;
  text-align: right;
  width: 100px;
}

.resource-card-price small {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}

/* Price range filter */
.price-range-tags .filter-tag {
  padding: 4px 8px;
  font-size: 12px;
}

/* Pagination */
.pagination {
  text-align: center;
  padding: 20px 0;
}

.pagination a, .pagination span {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  border-radius: 3px;
  font-size: 14px;
}

.pagination a {
  color: #666;
  background: #fff;
  text-decoration: none;
  border: 1px solid #e0e0e0;
}

.pagination a:hover {
  color: #2563EB;
  border-color: #2563EB;
}

.pagination span.current {
  color: #2563EB;
  background: #e8f0fe;
  border: 1px solid #2563EB;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    gap: 6px;
  }
  .filter-group-title {
    width: auto;
    text-align: left;
  }
  .filter-sidebar {
    padding: 12px;
  }
  .resource-card {
    padding: 10px 12px;
    gap: 8px;
  }
  .resource-card-tags {
    display: none;
  }
  .resource-card-price {
    width: auto;
  }
}

@media (max-width: 480px) {
  .filter-tag {
    padding: 3px 8px;
    font-size: 12px;
  }
  .resource-card-name {
    font-size: 14px;
  }
  .sort-bar {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}
