.recommendation-home {
  padding: 20px 0;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text-color);
  text-align: center;
}

.loading-container, .error-container, .no-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  color: var(--error-color, #e53935);
  margin-bottom: 15px;
}

.retry-button {
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.retry-button:hover {
  background-color: var(--primary-color-dark);
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
  justify-content: center;
  grid-auto-flow: dense;
}

@media (min-width: 1200px) {
  .recommendations-grid {
    grid-template-columns: repeat(5, 1fr);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .recommendations-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .recommendations-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* 响应式布局 */
@media (max-width: 768px) {
  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .recommendation-title {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }
  
  .recommendation-meta {
    font-size: 0.7rem;
    gap: 3px;
  }
  
  .recommendation-year, .recommendation-area, .recommendation-type {
    padding: 1px 5px;
    font-size: 0.7rem;
  }
  
  .recommendation-info {
    padding: 6px 8px;
  }
  
  /* 移除移动端特定的分页样式 */
}

.recommendation-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--card-bg-color, #fff);
  position: relative;
  cursor: pointer;
}

.recommendation-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.recommendation-thumbnail {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 140%; /* 保持10:14的宽高比 */
  overflow: hidden;
}

.recommendation-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.recommendation-card:hover .recommendation-image {
  transform: scale(1.05);
}

.recommendation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3) 50%, transparent 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.5s ease;
  z-index: 2;
}

.recommendation-card:hover .recommendation-overlay {
  opacity: 1;
}

.recommendation-play-icon {
  color: white;
  font-size: 48px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--primary-color-rgb, 124, 58, 237), 0.85);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0.9;
}

.recommendation-card:hover .recommendation-play-icon {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.recommendation-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  z-index: 3;
}

.recommendation-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.recommendation-title {
  font-size: 0.9rem;
  margin: 0 0 6px 0;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-color);
  white-space: normal;
  max-height: 2.8em;
}

.recommendation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary-color, #666);
}

.recommendation-year, .recommendation-area, .recommendation-type {
  background-color: var(--tag-bg-color, #f0f0f0);
  padding: 2px 6px;
  border-radius: 100px;
  font-size: 0.75rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-info {
  font-size: 0.95rem;
  color: var(--dark-color, #333);
  font-weight: 500;
  padding: 0 15px;
  text-align: center;
}

.page-button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: white;
  color: var(--primary-color, #7c3aed);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.page-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
  color: #999;
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: none;
}

.page-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.25);
}

/* 响应式分页样式 */
@media (max-width: 768px) {
  .pagination {
    margin-top: 20px;
    gap: 8px;
  }
  
  .page-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0.9rem;
  }
  
  .page-info {
    font-size: 0.85rem;
    padding: 0 10px;
  }
}

/* 过渡动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.no-content {
  color: var(--text-secondary-color, #666);
  font-size: 1.2rem;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .page-button {
    background-color: var(--card-bg-color-dark, #333);
    color: var(--primary-color, #7c3aed);
    border-color: rgba(124, 58, 237, 0.3);
  }
  
  .page-button:disabled {
    background-color: #222;
    color: #666;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .page-info {
    color: var(--text-color-dark, #e0e0e0);
  }
}