/* Enhanced Games Page Styling */

/* Page Header */
.page-header {
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('assets/banner.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 7rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(248, 183, 0, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: 1;
}

.page-header h1, .page-header p {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 3.5rem;
  margin-bottom: 1.2rem;
  color: white;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  display: inline-block;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.5rem 2rem;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  border: 2px solid var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: glowPulse 3s infinite alternate;
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.5);
  }
  100% {
    box-shadow: 0 5px 25px rgba(248, 183, 0, 0.4), 0 0 10px rgba(248, 183, 0, 0.2);
    text-shadow: 0 0 10px rgba(248, 183, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.7);
  }
}

.page-header p {
  max-width: 800px;
  margin: 0 auto 1.5rem;
  font-size: 1.3rem;
  color: white;
  line-height: 1.8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 1.2rem 2rem;
  border-radius: 8px;
  font-weight: 500;
}

.header-cta {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.header-cta .btn {
  padding: 1.2rem 3rem 1.2rem 1.5rem;
  border-radius: 50px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: white;
  color: var(--text-dark);
  border: 3px solid var(--primary-color);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: var(--primary-color);
  border-radius: 50%;
  font-size: 0.9rem;
  animation: bounce 1.5s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(-3px);
  }
  to {
    transform: translateY(3px);
  }
}

.header-cta .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.75s ease;
}

.header-cta .btn:hover {
  transform: translateY(-5px) scale(1.05);
  background: var(--primary-color);
  color: #000;
  box-shadow: 0 10px 25px rgba(248, 183, 0, 0.5), 0 0 0 4px rgba(248, 183, 0, 0.3);
}

.header-cta .btn:hover::before {
  left: 100%;
}

/* Game Categories Section */
.game-categories {
  padding: 4rem 1rem;
  background-color: #f9f9f9;
}

/* Enhanced Category Tabs */
.category-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  gap: 1rem;
}

.tab-btn {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--text-dark);
  padding: 0.8rem 1.8rem;
  cursor: pointer;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 1rem;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  transition: all 0.4s ease;
  z-index: -1;
}

.tab-btn:hover::before, .tab-btn.active::before {
  left: 0;
}

.tab-btn:hover, .tab-btn.active {
  color: var(--text-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(248, 183, 0, 0.3);
}

/* Enhanced Game Filters */
.game-filters {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.search-filter input, .provider-filter select {
  padding: 0.8rem 1.2rem;
  border: 1px solid #ddd;
  border-radius: 50px;
  min-width: 250px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-filter input:focus, .provider-filter select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(248, 183, 0, 0.2);
  outline: none;
}

.search-filter input {
  padding-left: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 1rem center;
}

/* Enhanced Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 1px solid #eee;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  border-color: var(--primary-color);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 1;
}

.game-card:hover::before {
  transform: scaleX(1);
}

.game-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.game-info {
  padding: 1.8rem;
  position: relative;
}

.game-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.game-card:hover .game-info h3 {
  color: var(--primary-color);
}

.game-info p {
  color: #666;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.provider {
  display: inline-block;
  background: var(--primary-gradient);
  color: var(--text-dark);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* Play Button Overlay */
.game-card::after {
  content: 'Play Now';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 220px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.game-card:hover::after {
  opacity: 1;
}

/* Related Information Section */
.game-related {
  background-color: #f0f0f0;
  padding: 5rem 1rem;
  position: relative;
}

.game-related::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--primary-gradient);
}

.game-related h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--text-dark);
  position: relative;
}

.game-related h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary-gradient);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.related-link {
  background-color: white;
  padding: 2.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  text-decoration: none;
  color: var(--text-dark);
  border-top: 4px solid transparent;
}

.related-link:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  border-top-color: var(--primary-color);
}

.related-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.related-link:hover .related-icon {
  transform: scale(1.2);
}

.related-link h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.related-link:hover h3 {
  color: var(--primary-color);
}

.related-link p {
  color: #666;
}

/* SVG Icons for Related Links */
.related-icon svg {
  width: 60px;
  height: 60px;
  fill: var(--primary-color);
  transition: all 0.3s ease;
}

.related-link:hover .related-icon svg {
  transform: scale(1.1);
  fill: #ff8c00;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 600px;
  display: none;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  fill: #ccc;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #666;
}

.empty-state p {
  color: #888;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2.5rem;
  }
  
  .game-filters {
    flex-direction: column;
    align-items: center;
  }
  
  .search-filter input, .provider-filter select {
    width: 100%;
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

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

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

.game-card:nth-child(2) {
  animation-delay: 0.2s;
}

.game-card:nth-child(3) {
  animation-delay: 0.4s;
}

.game-card:nth-child(4) {
  animation-delay: 0.6s;
}

.game-card:nth-child(5) {
  animation-delay: 0.8s;
}

.game-card:nth-child(6) {
  animation-delay: 1s;
}

.game-card:nth-child(7) {
  animation-delay: 1.2s;
}
