/* ====
   Games Pages Styles
   ==== */

/* Games Filter Section */
.games-filter-section {
  background: linear-gradient(135deg, rgba(26, 30, 36, 0.9) 0%, rgba(42, 45, 51, 0.9) 100%);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1001;
}

.games-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Search Bar */
.filter-search {
  flex: 1;
  max-width: 300px;
  min-width: 250px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.games-search-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.games-search-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.games-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
  font-size: 18px;
  pointer-events: none;
}

/* Filter Dropdowns */
.filter-dropdowns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1002;
}

.filter-dropdown {
  min-width: 180px;
  position: relative;
}

.games-select {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  appearance: none;
  padding-right: 50px;
}

.games-select:focus {
  outline: none;
  border-color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.games-select option {
  background: linear-gradient(135deg, rgba(26, 30, 36, 0.95) 0%, rgba(42, 45, 51, 0.95) 100%);
  color: #ffffff;
  padding: 10px 15px;
  border: none;
}

.games-select option:disabled {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  background: rgba(42, 45, 51, 0.9);
}

.games-select option:hover {
  background: rgba(212, 175, 55, 0.2);
  color: var(--secondary-color);
}

/* Category Buttons */
.category-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.category-indicator {
    position: absolute;
    box-sizing: border-box;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f59e0b 100%);
    border-radius: 25px;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.4s ease, border-color 0.4s ease;

  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.category-btn:focus {
  outline: none;
}

.category-btn.active {
  background: transparent;
  border-color: transparent;
  color: #000000;
  box-shadow: none;
}

.category-btn i {
  font-size: 18px;
}

/* Games Grid */
.games-grid-section {
  margin-top: 40px;
}

.game-card {
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.game-item {
  background: linear-gradient(135deg, rgba(26, 30, 36, 0.9) 0%, rgba(42, 45, 51, 0.9) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.game-item:hover {
  transform: translateY(-5px);
  border-color: var(--secondary-color);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.game-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-item:hover .game-thumb img {
  transform: scale(1.05);
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(26, 30, 36, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.game-item:hover .game-overlay {
  opacity: 1;
}

.play-btn,
.demo-btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.play-btn {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #f59e0b 100%);
  color: #000000;
  border: none;
}

.play-btn:hover {
  background: linear-gradient(135deg, #f59e0b 0%, var(--secondary-color) 100%);
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.demo-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.demo-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.game-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.game-provider {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 500;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
  .games-filter-section {
    padding: 15px;
  }

  .games-filter-wrapper {
    gap: 12px;
    justify-content: space-between;
  }

  .filter-search {
    flex: 1;
    max-width: none;
    min-width: auto;
    order: 1;
  }

  .filter-dropdowns {
    flex: 1;
    gap: 8px;
    order: 2;
  }

  .filter-dropdown {
    width: 100%;
    min-width: 120px;
  }

  .games-select {
    padding: 12px 15px;
    font-size: 14px;
    padding-right: 35px;
  }

  .category-buttons {
    gap: 6px;
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .category-btn {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 20px;
    min-width: auto;
  }

  .category-btn span {
    display: none;
  }

  .category-btn i {
    font-size: 16px;
  }
}

@media only screen and (max-width: 480px) {
  .games-filter-section {
    padding: 12px;
    border-radius: 12px;
  }

  .games-filter-wrapper {
    flex-direction: column;
    gap: 12px;
  }

  .filter-search {
    order: 1;
    width: 100%;
    max-width: none;
  }

  .search-input-wrapper {
    max-width: none;
  }

  .games-search-input {
    padding: 12px 45px 12px 15px;
    font-size: 14px;
  }

  .filter-dropdowns {
    order: 2;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }

  .filter-dropdown {
    flex: 1;
    min-width: 0;
  }

  .games-select {
    padding: 10px 12px;
    font-size: 13px;
    padding-right: 35px;
    background-size: 14px;
    background-position: right 10px center;
  }

  .category-buttons {
    order: 3;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .category-btn {
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 11px;
  }

  .category-btn i {
    font-size: 14px;
  }

  .game-info {
    padding: 15px;
  }

  .game-title {
    font-size: 16px;
  }

  .game-provider {
    font-size: 13px;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card {
  animation: fadeInUp 0.5s ease-out;
}

/* Hidden class for filtering */
.game-card.hidden {
  display: none;
}

/* Custom 5 columns for desktop */
@media (min-width: 1200px) {
  .col-xl-5-cols {
    flex: 0 0 20%;
    max-width: 20%;
  }
}