.main-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 300;
}

/* Search Section */
.search-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin: -2rem auto 3rem auto;
  max-width: 600px;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  border: 2px solid var(--light-red);
  border-radius: 12px;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: var(--light-gray);
}

.search-input:focus {
  border-color: var(--primary-red);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
  background: white;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-red);
  font-size: 1.2rem;
}

/* Categories Filter */
.category-filter {
  margin-bottom: 3rem;
}

.category-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.category-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--light-red);
  background: white;
  color: var(--primary-red);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.category-btn:hover,
.category-btn.active {
  background: var(--primary-red);
  color: white;
  border-color: var(--primary-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.game-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(220, 53, 69, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-red);
}

.game-card:hover::before {
  opacity: 1;
}

.game-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem auto;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.game-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.game-description {
  font-size: 0.9rem;
  color: #6c757d;
  position: relative;
  z-index: 2;
}

.game-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--light-red);
  color: var(--primary-red);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 3;
}

/* Stats Section */
.stats-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--dark-gray);
  font-weight: 500;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #6c757d;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results h3 {
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

/* Loading */
.loading {
  text-align: center;
  padding: 4rem 2rem;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

/* Responsive */
@media (max-width: 768px) {
  .section {
    padding: 40px 0;
  }

  .main-title {
    font-size: 2rem;
  }

  .search-section {
    margin: -1.5rem 1rem 2rem 1rem;
    padding: 1.5rem;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .game-card {
    padding: 1.5rem;
  }

  .game-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  .category-buttons {
    gap: 0.75rem;
  }

  .category-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .game-card {
    padding: 1rem;
  }

  .game-icon {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .game-name {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
  }

  .game-description {
    font-size: 0.85rem;
  }

  .category-buttons {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .category-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* Popular Badge */
.popular-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  background: var(--primary-red);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 0 0 15px 0;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 4;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card {
  animation: fadeInUp 0.6s ease forwards;
}

.game-card:nth-child(even) {
  animation-delay: 0.1s;
}

.game-card:nth-child(3n) {
  animation-delay: 0.2s;
}