/* 全新布局结构的列表页样式 */

.new-list-layout {
  width: 100%;
  min-height: calc(100vh - 80px);
  background: #f8f9fa;
}

/* 页面头部 */
.list-header {
  background: linear-gradient(135deg, #1a2a6c, #2c3e50);
  color: white;
  padding: 1rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.list-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(30deg);
  animation: shine 8s infinite linear;
}

.list-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><rect x="0" y="0" width="100" height="100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>');
  background-size: 20px 20px;
  opacity: 0.3;
}

@keyframes shine {
  0% {
    transform: rotate(30deg) translate(-10%, -10%);
  }
  100% {
    transform: rotate(30deg) translate(10%, 10%);
  }
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.page-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  background: linear-gradient(to right, #fff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
  position: relative;
  animation: titleFloat 6s ease-in-out infinite;
}

@keyframes titleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.page-description {
  font-size: 1.3rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* 头部装饰横条 */
.header-accent {
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  margin: 1.5rem auto;
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
  animation: accentPulse 3s ease-in-out infinite;
}

@keyframes accentPulse {
  0%, 100% {
    transform: scaleX(1);
    opacity: 1;
  }
  50% {
    transform: scaleX(1.2);
    opacity: 0.8;
  }
}

/* 主要内容布局 */
.list-main {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
}

/* 侧边栏 */
.sidebar {
  flex: 0 0 300px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar-content {
  padding: 2rem;
}

.filter-section {
  margin-bottom: 2rem;
}

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

.filter-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #333;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f1f3f4;
}

.category-list {
  list-style: none;
}

.category-item {
  margin-bottom: 0.5rem;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #5f6368;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.category-link:hover,
.category-link.active {
  background: #f1f3f4;
  color: #333;
}

.category-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.category-count {
  background: #f1f3f4;
  color: #5f6368;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.category-link.active .category-count {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.sort-select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 15px;
  border: 2px solid #f1f3f4;
  background: white;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.sort-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 5px;
  border: 2px solid #f1f3f4;
  appearance: none;
  position: relative;
  cursor: pointer;
}

.filter-checkbox:checked {
  background: #667eea;
  border-color: #667eea;
}

.filter-checkbox:checked::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

.filter-label {
  color: #5f6368;
  cursor: pointer;
  font-weight: 500;
}

/* 主内容区域 */
.main-content {
  flex: 1;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f1f3f4;
}

.results-count {
  font-weight: 600;
  color: #333;
  font-size: 1.125rem;
}

.view-controls {
  display: flex;
  gap: 0.5rem;
}

.view-toggle {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f1f3f4;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.125rem;
  color: #5f6368;
}

.view-toggle:hover,
.view-toggle.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* 游戏容器 */
.games-container {
  display: grid;
  gap: 2rem;
}

.games-container.grid-view {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.games-container.list-view {
  grid-template-columns: 1fr;
}

.games-container.list-view .game-item {
  max-width: 100%;
}

.game-item {
  transition: all 0.3s ease;
}

.game-item:hover {
  transform: translateY(-5px);
}

.game-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-media {
  position: relative;
  padding-top: 130%;
}

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

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

.game-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  color: #333;
  padding: 0.5rem;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.75rem;
  z-index: 2;
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #333;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex: 1;
}

.game-category {
  background: #f1f3f4;
  color: #5f6368;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.875rem;
  font-weight: 500;
}

.rating-value {
  margin-left: 0.25rem;
  font-size: 0.875rem;
  color: #5f6368;
}

.game-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.action-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  gap: 0.5rem;
}

.action-button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.action-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-button.secondary {
  background: #f1f3f4;
  color: #5f6368;
}

.action-button.secondary:hover {
  background: #e8eaed;
  transform: translateY(-2px);
}

/* 列表视图特殊样式 */
.games-container.list-view .card-media {
  width: 200px;
  padding-top: 0;
  height: 150px;
  flex: 0 0 200px;
}

.games-container.list-view .game-card {
  flex-direction: row;
}

.games-container.list-view .card-content {
  flex: 1;
}

.games-container.list-view .game-actions {
  justify-content: flex-end;
}

/* 无游戏提示 */
.no-games {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.no-games-icon {
  font-size: 4rem;
  color: #f1f3f4;
  margin-bottom: 2rem;
}

.no-games h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #333;
}

.no-games p {
  font-size: 1.125rem;
  color: #5f6368;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #f1f3f4;
}

.pagination-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  text-decoration: none;
  color: #5f6368;
  font-weight: 600;
  transition: all 0.3s ease;
  background: #f1f3f4;
  flex-shrink: 0;
}

.pagination-arrow:hover {
  background: #e8eaed;
  transform: translateY(-2px);
}

.pagination-pages {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: #5f6368;
  font-weight: 600;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.pagination-link:hover,
.pagination-link.active {
  background: #667eea;
  color: white;
}

/* 移动端筛选按钮 */
.mobile-filter-toggle {
  display: none;
  width: 100%;
  padding: 12px 20px;
  margin-top: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  z-index: 10;
}

.mobile-filter-toggle i {
  margin-right: 8px;
}

/* 移动端筛选面板 */
.mobile-filter-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
}

.mobile-filter-content {
  background: white;
  width: 90%;
  max-width: 400px;
  margin: 20px auto;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

.mobile-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f3f4;
}

.mobile-filter-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.mobile-filter-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #5f6368;
  padding: 5px;
}

.mobile-filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.mobile-filter-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.mobile-filter-apply {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.mobile-filter-reset {
  background: #f1f3f4;
  color: #5f6368;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .games-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 992px) {
  .list-main {
    flex-direction: column;
  }
  
  .sidebar {
    position: static;
    width: 100%;
  }
  
  .games-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .sidebar-content {
    padding: 1.5rem;
  }
  
  .filter-title {
    font-size: 1.125rem;
  }
  
  .category-link {
    padding: 0.625rem 0.875rem;
  }
  
  .card-content {
    padding: 1.25rem;
  }
  
  .game-title {
    font-size: 1.125rem;
  }
  
  .action-button {
    padding: 0.625rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 768px) {
  /* 在移动端显示筛选按钮 */
  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* 在移动端隐藏侧边栏 */
  .sidebar {
    display: none;
  }
  
  .list-header {
    padding: 2rem 0;
  }
  
  .header-content {
    padding: 0 1rem;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .page-description {
    font-size: 1rem;
  }
  
  .list-main {
    padding: 0;
  }
  
  .main-content {
    padding: 0.5rem;
  }

  .content-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .games-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }
  
  .games-container.list-view .card-media {
    width: 150px;
    height: 120px;
    flex: 0 0 150px;
  }
  
  .game-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .game-actions {
    gap: 0.5rem;
    margin-top: 0.75rem;
  }
  
  .action-button {
    padding: 0.625rem;
    font-size: 0.75rem;
  }
  
  /* 分页在中等屏幕上的调整 */
  .pagination {
    gap: 0.5rem;
  }
  
  .pagination-arrow {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
  
  .pagination-link {
    min-width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .games-container.grid-view {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .games-container.list-view .game-card {
    flex-direction: column;
  }
  
  .games-container.list-view .card-media {
    width: 100%;
    height: 200px;
    flex: 0 0 auto;
  }
  
  .card-media {
    padding-top: 75%; /* 在移动端使用更合适的16:9比例 */
  }
  
  .game-actions {
    flex-direction: column;
  }
  
  .content-header {
    align-items: center;
  }
  
  .results-count {
    font-size: 1rem;
    text-align: center;
  }
  
  .view-controls {
    align-self: center;
  }
  
  .filter-section {
    margin-bottom: 1.5rem;
  }
  
  .filter-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .category-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
  }
  
  .category-count {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }
  
  .sort-select {
    padding: 0.625rem;
    font-size: 0.9375rem;
  }
  
  .filter-option {
    gap: 0.5rem;
  }
  
  .filter-label {
    font-size: 0.9375rem;
  }
  
  .filter-checkbox {
    width: 1rem;
    height: 1rem;
  }
  
  /* 分页在小屏幕上的优化 */
  .pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .pagination-pages {
    order: -1;
    width: 100%;
    justify-content: center;
    margin-bottom: 1rem;
  }
  
  .pagination-arrow {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  
  .pagination-link {
    min-width: 32px;
    height: 32px;
    font-size: 0.75rem;
    padding: 0 0.25rem;
  }
  
  /* 移动端筛选面板适配 */
  .mobile-filter-content {
    width: 95%;
    margin: 10px auto;
    padding: 15px;
  }
  
  .mobile-filter-title {
    font-size: 1.25rem;
  }
}