/* Categories Page Styles */

.fp-main {
  margin-top: var(--fp-header-height);
  min-height: calc(100vh - var(--fp-header-height));
}

/* Page Header */
.fp-page-header {
  background: var(--fp-gradient-hero);
  color: var(--fp-text-white);
  padding: var(--fp-space-3xl) 0 var(--fp-space-2xl);
  position: relative;
  overflow: hidden;
}

.fp-page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 107, 157, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.2) 0%, transparent 50%);
  z-index: 1;
}

.fp-page-header > .fp-container {
  position: relative;
  z-index: 2;
}

.fp-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--fp-space-sm);
  margin-bottom: var(--fp-space-lg);
  font-size: var(--fp-text-sm);
  opacity: 0.9;
}

.fp-breadcrumb a {
  color: var(--fp-text-white);
  text-decoration: none;
  transition: var(--fp-transition-fast);
}

.fp-breadcrumb a:hover {
  opacity: 0.8;
}

.fp-page-title {
  font-size: var(--fp-text-5xl);
  font-weight: var(--fp-weight-bold);
  margin-bottom: var(--fp-space-md);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 767px) {
  .fp-page-title {
    font-size: var(--fp-text-4xl);
  }
}

.fp-page-subtitle {
  font-size: var(--fp-text-lg);
  opacity: 0.9;
  max-width: 600px;
}

/* Category Filter */
.fp-category-filter {
  background: var(--fp-bg-card);
  border-bottom: 1px solid var(--fp-border-light);
  padding: var(--fp-space-xl) 0;
  position: sticky;
  top: var(--fp-header-height);
  z-index: var(--fp-z-sticky);
}

.fp-filter-tabs {
  display: flex;
  gap: var(--fp-space-sm);
  margin-bottom: var(--fp-space-lg);
  overflow-x: auto;
  padding-bottom: var(--fp-space-sm);
}

.fp-filter-tab {
  flex-shrink: 0;
  padding: var(--fp-space-md) var(--fp-space-lg);
  background: var(--fp-bg-secondary);
  color: var(--fp-text-secondary);
  border: 2px solid transparent;
  border-radius: var(--fp-radius-2xl);
  font-weight: var(--fp-weight-medium);
  cursor: pointer;
  transition: all var(--fp-transition-fast);
  white-space: nowrap;
}

.fp-filter-tab:hover {
  background: var(--fp-bg-tertiary);
  color: var(--fp-primary);
}

.fp-filter-tab.fp-filter-active {
  background: var(--fp-gradient-primary);
  color: var(--fp-text-white);
  border-color: var(--fp-primary);
  box-shadow: var(--fp-shadow-colored);
}

.fp-filter-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fp-space-lg);
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .fp-filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: var(--fp-space-md);
  }
}

.fp-sort-control {
  display: flex;
  align-items: center;
  gap: var(--fp-space-md);
}

.fp-sort-control label {
  font-weight: var(--fp-weight-medium);
  color: var(--fp-text-secondary);
  white-space: nowrap;
}

.fp-sort-select {
  padding: var(--fp-space-sm) var(--fp-space-md);
  border: 2px solid var(--fp-border-light);
  border-radius: var(--fp-radius-lg);
  background: var(--fp-bg-card);
  font-size: var(--fp-text-sm);
  cursor: pointer;
  transition: var(--fp-transition-fast);
}

.fp-sort-select:focus {
  border-color: var(--fp-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.fp-view-control {
  display: flex;
  gap: var(--fp-space-xs);
  background: var(--fp-bg-secondary);
  padding: var(--fp-space-xs);
  border-radius: var(--fp-radius-lg);
}

.fp-view-btn {
  padding: var(--fp-space-sm);
  background: transparent;
  border: none;
  border-radius: var(--fp-radius-md);
  color: var(--fp-text-muted);
  cursor: pointer;
  transition: var(--fp-transition-fast);
}

.fp-view-btn:hover {
  color: var(--fp-primary);
  background: rgba(255, 107, 157, 0.1);
}

.fp-view-btn.fp-view-active {
  background: var(--fp-primary);
  color: var(--fp-text-white);
}

.fp-view-btn svg {
  width: 18px;
  height: 18px;
}

/* Games Section */
.fp-games-section {
  padding: var(--fp-space-3xl) 0;
  background: var(--fp-bg-primary);
}

.fp-games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--fp-space-2xl);
  flex-wrap: wrap;
  gap: var(--fp-space-lg);
}

@media (max-width: 767px) {
  .fp-games-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

.fp-games-count {
  font-size: var(--fp-text-lg);
  font-weight: var(--fp-weight-medium);
  color: var(--fp-text-secondary);
}

.fp-games-pagination {
  display: flex;
  align-items: center;
  gap: var(--fp-space-lg);
}

.fp-pagination-btn {
  display: flex;
  align-items: center;
  gap: var(--fp-space-sm);
  padding: var(--fp-space-md) var(--fp-space-lg);
  background: var(--fp-bg-card);
  color: var(--fp-text-secondary);
  border: 2px solid var(--fp-border-light);
  border-radius: var(--fp-radius-lg);
  font-weight: var(--fp-weight-medium);
  cursor: pointer;
  transition: var(--fp-transition-fast);
}

.fp-pagination-btn:hover:not(:disabled) {
  background: var(--fp-primary);
  color: var(--fp-text-white);
  border-color: var(--fp-primary);
}

.fp-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fp-pagination-btn svg {
  width: 16px;
  height: 16px;
}

.fp-pagination-info {
  font-size: var(--fp-text-sm);
  color: var(--fp-text-muted);
  white-space: nowrap;
}

/* Games Grid */
.fp-games-container {
  position: relative;
  min-height: 400px;
}

.fp-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--fp-space-xl);
  justify-items: center;
}

@media (max-width: 639px) {
  .fp-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--fp-space-lg);
  }
}

/* List View */
.fp-games-grid.fp-list-view {
  grid-template-columns: 1fr;
  gap: var(--fp-space-lg);
}

.fp-games-grid.fp-list-view .fp-game-card {
  width: 100%;
  max-width: none;
  height: auto;
  display: flex;
  flex-direction: row;
}

.fp-games-grid.fp-list-view .fp-game-card-image {
  width: 200px;
  height: 150px;
  flex-shrink: 0;
}

.fp-games-grid.fp-list-view .fp-game-card-content {
  flex: 1;
  height: auto;
  padding: var(--fp-space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fp-games-grid.fp-list-view .fp-game-card-title {
  font-size: var(--fp-text-lg);
  margin-bottom: var(--fp-space-sm);
}

.fp-games-grid.fp-list-view .fp-game-card-category {
  margin-bottom: var(--fp-space-md);
}

@media (max-width: 639px) {
  .fp-games-grid.fp-list-view .fp-game-card {
    flex-direction: column;
  }
  
  .fp-games-grid.fp-list-view .fp-game-card-image {
    width: 100%;
    height: 200px;
  }
}

/* Loading States */
.fp-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.fp-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--fp-border-light);
  border-top: 4px solid var(--fp-primary);
  border-radius: 50%;
  animation: fp-spin 1s linear infinite;
}

/* Empty State */
.fp-empty-state {
  text-align: center;
  padding: var(--fp-space-4xl) var(--fp-space-xl);
  color: var(--fp-text-muted);
}

.fp-empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--fp-space-lg);
  opacity: 0.5;
}

.fp-empty-state-title {
  font-size: var(--fp-text-2xl);
  font-weight: var(--fp-weight-semibold);
  color: var(--fp-text-secondary);
  margin-bottom: var(--fp-space-md);
}

.fp-empty-state-description {
  font-size: var(--fp-text-base);
  margin-bottom: var(--fp-space-xl);
}

/* Category Specific Styles */
.fp-category-adventure .fp-page-header {
  background: var(--fp-adventure);
}

.fp-category-puzzle .fp-page-header {
  background: var(--fp-puzzle);
}

.fp-category-sports .fp-page-header {
  background: var(--fp-sports);
}

.fp-category-girls .fp-page-header {
  background: var(--fp-girls);
}

.fp-category-casual .fp-page-header {
  background: var(--fp-casual);
}

.fp-category-clicker .fp-page-header {
  background: var(--fp-clicker);
}

/* Animations */
.fp-game-enter {
  animation: fp-game-enter 0.3s ease-out forwards;
}

@keyframes fp-game-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fp-game-exit {
  animation: fp-game-exit 0.2s ease-in forwards;
}

@keyframes fp-game-exit {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
  .fp-page-header {
    padding: var(--fp-space-2xl) 0 var(--fp-space-xl);
  }
  
  .fp-games-section {
    padding: var(--fp-space-2xl) 0;
  }
}

@media (max-width: 767px) {
  .fp-category-filter {
    padding: var(--fp-space-lg) 0;
  }
  
  .fp-filter-tabs {
    margin-bottom: var(--fp-space-md);
  }
  
  .fp-games-header {
    margin-bottom: var(--fp-space-xl);
  }
  
  .fp-games-pagination {
    flex-direction: column;
    gap: var(--fp-space-md);
  }
}