/* ==== RESET & GLOBAL STYLES ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  background: linear-gradient(180deg, #3b0068 0%, #001a33 100%);
  color: #fff;
  min-height: 100vh;
  line-height: 1.6;
}

/* ==== HEADER & NAVIGATION ==== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(20, 0, 50, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 6px rgba(0,255,255,0.3);
}

.site-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 6px rgba(0,255,255,0.25);
}
/* ==== LOGO LINK STYLES ==== */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.8;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s;
}

.search-bar:hover {
  border-color: rgba(0,255,255,0.4);
  box-shadow: 0 0 8px rgba(0,255,255,0.2);
}

.search-bar input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 6px 10px;
  width: 160px;
  font-size: 0.9rem;
  outline: none;
}

.search-bar button {
  background: none;
  border: none;
  color: #0ff;
  padding: 6px 10px;
  cursor: pointer;
}

.search-bar button:hover {
  color: #fff;
}

.menu-toggle {
  background: rgba(255,255,255,0.05);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.menu-toggle:hover {
  background: rgba(0,255,255,0.15);
  color: #0ff;
}

/* ==== SECTION TITLES ==== */
.section-title,
.popular-section-title,
.categories-title,
.article-title,
.search-title {
  text-align: center;
  font-size: 1.8rem;
  margin: 40px 0 24px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
  font-weight: 600;
  width: 100%;
}

.popular-section-title {
  position: relative;
}

.popular-section-title::after {
  position: absolute;
  right: 20%;
  animation: fire 2s infinite alternate;
}

@keyframes fire {
  0% { transform: scale(1); }
  100% { transform: scale(1.2); }
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.search-title {
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 93%;
	  margin:0 auto;
	  
    }
	.section-title {
      font-size: 1.8rem;
      color: #fff;
      text-shadow: 0 0 10px rgba(255,255,255,0.3);
      font-weight: 600;
	  width: auto;
    }
.games-tabs {
      display: flex;
      align-items: center;
      gap: 0;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .tab-btn {
      background: transparent;
      border: none;
      color: #cbd5e1;
      padding: 10px 20px;
      cursor: pointer;
      transition: all 0.3s ease;
      font-size: 0.9rem;
      font-weight: 500;
      border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .tab-btn:last-child {
      border-right: none;
    }

    .tab-btn:hover {
      background: rgba(0, 255, 255, 0.1);
      color: #0ff;
    }

    .tab-btn.active {
      background: rgba(0, 255, 255, 0.2);
      color: #0ff;
      font-weight: 600;
    }
/* ==== GRID LAYOUTS ==== */
.games-grid,
.popular-games-grid,
.categories-grid,
.suggestions-grid {
  display: grid;
  gap: 20px;
  width: 95%;
  max-width: none;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.games-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-bottom: 60px;
}

.popular-games-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 25px;
}

.categories-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-bottom: 60px;
}

.suggestions-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 800px;
  gap: 15px;
}
.game-card-link ,.popular-game-link{
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.game-card-link:hover .game-card, .popular-game-link:hover .popular-game-card {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  background: rgba(255, 255, 255, 0.08);
}
.popular-game-link:hover .popular-game-card {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.5);
}
/* Đảm bảo các hiệu ứng hover của game-card vẫn hoạt động */
.game-card-link:hover .game-card:hover {
  transform: translateY(-6px);
}
/* ==== CARD STYLES ==== */
.game-card,
.popular-game-card,
.category-card,
.suggestion-tag,
.filter-option {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-card,
.popular-game-card {
  overflow: hidden;
}

.game-card:hover,
.popular-game-card:hover,
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  background: rgba(255, 255, 255, 0.08);
}

.popular-game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.5);
}

/* Popular Game Specific Styles */
.popular-game-card {
  position: relative;
}

.popular-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #ff8a00, #ff2070);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Card Images */
.game-card img,
.popular-game-card img {
  width: 100%;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.game-card img {
  aspect-ratio: 1 / 1;
}

.popular-game-card img {
  height: 150px;
}

/* Card Content */
.game-card .title,
.popular-game-title,
.category-name {
  font-size: 1rem;
  color: #f5f8ff;
  font-weight: 600;
  margin: 10px;
  line-height: 1.3;
}

.popular-game-title {
  font-size: 1.1rem;
  margin: 0 0 10px;
}

.popular-game-info {
  padding: 18px;
}

.popular-game-desc {
  font-size: 0.85rem;
  color: #bcd;
  margin-bottom: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.popular-game-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 12px;
}

.popular-game-rating,
.popular-game-plays {
  display: flex;
  align-items: center;
  gap: 5px;
}

.popular-game-rating i {
  color: #ffc107;
}

.popular-game-plays i {
  color: #0ff;
}

/* Category Card Styles */
.category-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.category-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 1.5rem;
  color: #0ff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.category-info {
  flex: 1;
}

.game-count {
  color: #bcd;
  font-size: 0.9rem;
}
/* Category Icon Styles for PNG images */
.category-icon-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  /* filter: brightness(0) saturate(100%) invert(70%) sepia(100%) saturate(500%) hue-rotate(160deg);*/
}

/* Giữ nguyên các style hiện có cho category-icon nhưng điều chỉnh cho phù hợp với ảnh */
.category-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Đảm bảo responsive cho icon PNG */
@media (max-width: 768px) {
  .category-icon {
    width: 45px;
    height: 45px;
  }
  
  .category-icon-img {
    width: 25px;
    height: 25px;
  }
}

@media (max-width: 480px) {
  .category-icon {
    width: 40px;
    height: 40px;
  }
  
  .category-icon-img {
    width: 22px;
    height: 22px;
  }
}
/* ==== PAGINATION ==== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 40px auto 60px;
  padding: 0 20px;
  flex-wrap: wrap;
}

/* ==== PAGINATION STYLES (Updated for Python pagination) ==== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px auto 60px;
  padding: 0 20px;
  flex-wrap: wrap;
}

.pagination .page-item {
  list-style: none;
  margin: 0;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 42px;
  height: 42px;
}

.pagination .page-link:hover:not(.disabled) {
  background: rgba(0, 255, 255, 0.15);
  border-color: rgba(0, 255, 255, 0.4);
  color: #0ff;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
  transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #0ff, #00bfff);
  border-color: transparent;
  color: #001a33;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  font-weight: 600;
}

.pagination .page-item.disabled .page-link {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.pagination .page-item.disabled .page-link:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

/* Special styling for navigation arrows */
.pagination .page-link[aria-label="Next"],
.pagination .page-link:contains("»"),
.pagination .page-link:contains("«") {
  font-weight: 600;
  padding: 10px 14px;
}

/* Responsive styles for pagination */
@media (max-width: 768px) {
  .pagination {
    gap: 6px;
    padding: 0 15px;
  }
  
  .pagination .page-link {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: 38px;
    height: 38px;
  }
  
  .pagination .page-link[aria-label="Next"],
  .pagination .page-link:contains("»"),
  .pagination .page-link:contains("«") {
    padding: 8px 12px;
  }
}

@media (max-width: 600px) {
  .pagination {
    gap: 4px;
  }
  
  .pagination .page-link {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-width: 34px;
    height: 34px;
  }
  
  .pagination .page-link[aria-label="Next"],
  .pagination .page-link:contains("»"),
  .pagination .page-link:contains("«") {
    padding: 6px 10px;
  }
  
  /* Hide some page numbers on very small screens */
  .pagination .page-item:nth-child(n+4):nth-child(-n+7) {
    display: none;
  }
  
  .pagination .page-item.disabled .page-link[aria-hidden="true"] {
    display: none;
  }
}

@media (max-width: 480px) {
  .pagination {
    gap: 3px;
  }
  
  .pagination .page-link {
    padding: 5px 8px;
    font-size: 0.75rem;
    min-width: 32px;
    height: 32px;
  }
  
  .pagination .page-link[aria-label="Next"],
  .pagination .page-link:contains("»"),
  .pagination .page-link:contains("«") {
    padding: 5px 8px;
  }
}

/* Ensure the pagination container is centered */
nav[aria-label="..."] {
  display: flex;
  justify-content: center;
  width: 100%;
}

nav[aria-label="..."] .pagination {
  margin: 40px auto 60px;
}

/* ==== BUTTON STYLES ==== */
.join-btn,
.search-button {
  background: linear-gradient(135deg, #0ff, #00bfff);
  border: none;
  color: #001a33;
  padding: 8px 18px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0,255,255,0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.join-btn:hover,
.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0,255,255,0.7);
}

.search-button {
  padding: 0 25px;
}

/* ==== FOOTER ==== */
.site-footer {
  background: rgba(0, 10, 40, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 20px;
  color: #cbd5e1;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  max-width: 1200px;
  width: 100%;
}

.footer-left {
  flex: 1 1 250px;
  color: #bcd;
  line-height: 1.6;
}

.footer-left a {
  color: #0ff;
  text-decoration: none;
}

.footer-left a:hover {
  text-decoration: underline;
}

.footer-center {
  flex: 1 1 350px;
  text-align: center;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer-links a {
  color: #bcd;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  border-color: #0ff;
  color: #fff;
  box-shadow: 0 0 8px rgba(0,255,255,0.3);
}

.footer-right {
  flex: 1 1 250px;
  text-align: right;
}

.footer-right .brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.social-icons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.social-icons a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  color: #0ff;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.social-icons a:hover {
  background: #0ff;
  color: #001a33;
}

/* ==== SEARCH PAGE STYLES ==== */
.search-page {
  padding: 20px;
}

.search-header {
  text-align: center;
  margin: 30px 0 40px;
}

.search-subtitle {
  color: #bcd;
  font-size: 1rem;
  margin-bottom: 30px;
}

.search-container {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.search-input-wrapper {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.search-input-wrapper:focus-within {
  border-color: #0ff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 15px 20px;
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-results-info {
  text-align: center;
  margin-bottom: 30px;
  color: #bcd;
}

.search-results-count {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.search-query {
  color: #0ff;
  font-weight: 600;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #94a3b8;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #fff;
}

.search-suggestions {
  margin-top: 30px;
}

.suggestions-title {
  text-align: center;
  color: #bcd;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.suggestion-tag,
.filter-option {
  color: #bcd;
  padding: 10px 15px;
  text-align: center;
  text-decoration: none;
  display: block;
}

.suggestion-tag:hover,
.filter-option:hover,
.filter-option.active {
  background: rgba(0, 255, 255, 0.1);
  border-color: #0ff;
  color: #fff;
  transform: translateY(-2px);
}

.filter-option {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* ==== ARTICLE STYLES ==== */
.article-section {
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.article-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-meta {
  color: #bcd;
  font-size: 0.9rem;
}

.article-content {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.content-section {
  margin-bottom: 30px;
}

.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #0ff;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  padding-bottom: 8px;
}

.content-section p {
  margin-bottom: 15px;
  color: #e0e0e0;
}

.content-section ul, .content-section ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.content-section li {
  margin-bottom: 8px;
  color: #e0e0e0;
}

.highlight-box {
  background: rgba(0, 255, 255, 0.1);
  border-left: 4px solid #0ff;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
}

.article-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #bcd;
  font-size: 0.9rem;
}

/* ==== LOADING ANIMATION ==== */
.loading-spinner {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #0ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 1200px) {
  .popular-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 22px;
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 992px) {
  .popular-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
  }
  
  .popular-section-title::after {
    right: 15%;
  }
}

@media (max-width: 768px) {
  .section-title,
  .popular-section-title,
  .categories-title,
  .article-title,
  .search-title {
    font-size: 1.6rem;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .search-title {
    font-size: 1.8rem;
  }
  
  .games-grid,
  .popular-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
    width: 92%;
    padding: 0 15px;
  }
  
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
  
  .popular-game-card img {
    height: 150px;
  }
  
  .popular-game-info {
    padding: 15px;
  }
  
  .popular-game-title {
    font-size: 1rem;
  }
  
  .popular-section-title::after {
    right: 10%;
  }
  
  .pagination {
    gap: 10px;
  }
  
  .page-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  
  .page-btn span {
    display: none;
  }
  
  .page-number {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }
  
  .article-content {
    padding: 25px;
  }
  
  .search-container {
    max-width: 90%;
  }
  
  .search-input {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  .search-button {
    padding: 0 20px;
  }
  
  .filter-options {
    gap: 10px;
  }
  
  .filter-option {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
  
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-right {
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .popular-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .popular-game-card img {
    height: 150px;
  }
  
  .popular-game-desc {
    font-size: 0.8rem;
    -webkit-line-clamp: 3;
    min-height: 60px;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
  
  .game-card .title {
    font-size: 0.9rem;
  }
}

@media (max-width: 500px) {
  .search-bar {
    display: none;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .categories-title {
    font-size: 1.4rem;
  }
  
  .article-title {
    font-size: 1.7rem;
  }
  
  .article-content {
    padding: 20px;
  }
  
  .search-title {
    font-size: 1.5rem;
  }
  
  .search-subtitle {
    font-size: 0.9rem;
  }
  
  .search-input-wrapper {
    flex-direction: column;
    border-radius: 12px;
  }
  
  .search-input {
    padding: 15px;
    text-align: center;
  }
  
  .search-button {
    padding: 12px;
    justify-content: center;
    border-radius: 0 0 10px 10px;
  }
  
  .suggestions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .popular-games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .popular-section-title {
    font-size: 1.5rem;
  }
  
  .popular-section-title::after {
    display: none;
  }
  
  .popular-game-info {
    padding: 12px;
  }
  
  .popular-game-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }
  
  .popular-game-desc {
    display: none;
  }
  
  .popular-game-stats {
    padding-top: 8px;
    font-size: 0.75rem;
  }
  
  .popular-badge {
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  
  .pagination {
    gap: 8px;
  }
  
  .page-numbers {
    gap: 5px;
  }
  
  .page-number {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }
  
  .page-dots {
    display: none;
  }
  
  .page-number:nth-child(n+4):nth-child(-n+6) {
    display: none;
  }
}

@media (max-width: 360px) {
  .popular-games-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .popular-game-card img {
    height: 150px;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 25px;
  }
}

@media (min-width: 1600px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 30px;
  }
}

@media (min-width: 2000px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
  }
}
/* ==== CATEGORIES SECTION - TAGS STYLE WITH IMAGE ICONS ==== */
.categories-section {
  padding: 40px 20px;
  margin: 0 auto;
}

.categories-title {
  text-align: center;
  font-size: 1.8rem;
  margin: 40px 0 30px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
  font-weight: 600;
  width: 100%;
}

.categories-tags-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Category Tag Styles with Image Icons */
.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 10px 16px;
  color: #bcd;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.category-tag:hover {
  background: rgba(0, 255, 255, 0.15);
  border-color: rgba(0, 255, 255, 0.4);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.2);
}

/* Category Icon Image Styles */
.category-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  /*filter: brightness(0.8) sepia(1) hue-rotate(160deg) saturate(2);
  transition: all 0.3s ease;*/
}

.category-tag:hover .category-icon-img {
  filter: brightness(1) sepia(0) hue-rotate(0deg) saturate(1);
  transform: scale(1.1);
}

/* Alternative style for colored icons (if your icons are already colored) */
.category-icon-img.colored {
  filter: none;
  opacity: 0.8;
}

.category-tag:hover .category-icon-img.colored {
  opacity: 1;
  transform: scale(1.1);
}
/* Category Card as Link */
.category-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
}

.category-icon-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  /*filter: brightness(0) saturate(100%) invert(70%) sepia(100%) saturate(500%) hue-rotate(160deg);*/
}

.category-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .category-card {
    padding: 15px;
    gap: 12px;
  }
  
  .category-icon {
    width: 45px;
    height: 45px;
  }
  
  .category-icon-img {
    width: 25px;
    height: 25px;
  }
}

@media (max-width: 480px) {
  .category-card {
    padding: 12px;
    gap: 10px;
  }
  
  .category-icon {
    width: 40px;
    height: 40px;
  }
  
  .category-icon-img {
    width: 22px;
    height: 22px;
  }
}
/* ==== RESPONSIVE DESIGN FOR CATEGORIES TAGS ==== */
@media (max-width: 768px) {
  .categories-section {
    padding: 30px 15px;
  }
  
  .categories-title {
    font-size: 1.6rem;
    margin: 30px 0 25px;
  }
  
  .categories-tags-container {
    gap: 10px;
    padding: 0 15px;
  }
  
  .category-tag {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  
  .category-icon-img {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 600px) {
  .categories-tags-container {
    gap: 8px;
  }
  
  .category-tag {
    padding: 7px 12px;
    font-size: 0.8rem;
    gap: 6px;
  }
  
  .category-icon-img {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .categories-section {
    padding: 20px 10px;
  }
  
  .categories-title {
    font-size: 1.4rem;
    margin: 20px 0;
  }
  
  .categories-tags-container {
    gap: 6px;
    padding: 0 10px;
  }
  
  .category-tag {
    padding: 6px 10px;
    font-size: 0.75rem;
    gap: 5px;
  }
  
  .category-icon-img {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 360px) {
  .categories-tags-container {
    gap: 5px;
  }
  
  .category-tag {
    padding: 5px 8px;
    font-size: 0.7rem;
    gap: 4px;
  }
  
  .category-icon-img {
    width: 12px;
    height: 12px;
  }
}

/* Optional: Color variations for different categories */
.category-tag:nth-child(3n+1):hover {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.4);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.category-tag:nth-child(3n+2):hover {
  background: rgba(78, 205, 196, 0.15);
  border-color: rgba(78, 205, 196, 0.4);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.2);
}

.category-tag:nth-child(3n+3):hover {
  background: rgba(159, 122, 234, 0.15);
  border-color: rgba(159, 122, 234, 0.4);
  box-shadow: 0 4px 12px rgba(159, 122, 234, 0.2);
}

/* Fallback styling for missing images */
.category-tag img[src=""],
.category-tag img:not([src]) {
  display: none;
}

.category-tag:not(:has(img))::before {
  content: "🎮";
  font-size: 0.8rem;
}

/* Additional styles for game detail page */
    .game-detail-container {
      max-width: 100%;
      margin: 0;
      padding: 20px;
    }

    .game-layout {
      display: grid;
      grid-template-columns: 250px 1fr 250px;
      gap: 20px;
      margin-bottom: 40px;
    }

    .game-main {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 8px 25px rgba(0,0,0,0.3);
      display: flex;
      flex-direction: column;
    }

    .game-player {
      width: 100%;
      height: 0;
      padding-bottom: 56.25%; /* 16:9 aspect ratio */
      background: #000;
      position: relative;
    }

    .game-placeholder {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(45deg, #3b0068, #001a33);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: #fff;
      text-align: center;
    }

    .game-placeholder i {
      font-size: 4rem;
      margin-bottom: 20px;
      color: #0ff;
    }

    .game-placeholder h3 {
      font-size: 1.5rem;
      margin-bottom: 10px;
    }

    .game-placeholder p {
      color: #cbd5e1;
      max-width: 400px;
      line-height: 1.5;
      margin-bottom: 20px;
    }

    /* Game Controls Container */
    .game-controls-container {
      display: flex;
      gap: 15px;
      margin-top: 20px;
      flex-wrap: wrap;
      justify-content: center;
    }

    /* Updated Play Button Styles for Game Placeholder */
    .game-placeholder .play-button {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      background: linear-gradient(135deg, #0ff, #00bfff);
      color: #001a33;
      border: none;
      padding: 16px 35px;
      font-size: 1.3rem;
      font-weight: 700;
      border-radius: 50px;
      cursor: pointer;
      box-shadow: 0 0 30px rgba(0,255,255,0.6);
      transition: all 0.3s ease;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .game-placeholder .play-button:hover {
      transform: translateY(-5px) scale(1.05);
      box-shadow: 0 0 40px rgba(0,255,255,0.8);
    }

    .game-placeholder .play-button i {
      font-size: 1.5rem;
      margin-bottom: 0;
    }

    /* Game Frame Styles */
    .game-frame {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: none;
      background: #000;
      display: none; /* Ẩn ban đầu */
    }

    .game-frame.active {
      display: block; /* Hiển thị khi game được load */
    }

    /* Game Controls Overlay */
    .game-controls-overlay {
      position: absolute;
      bottom: 15px;
      right: 15px;
      display: flex;
      gap: 10px;
      z-index: 10;
    }

    /* Compact Fullscreen Button */
    .game-fullscreen-btn {
      width: 40px;
      height: 40px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 8px;
      color: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      transition: all 0.3s ease;
      backdrop-filter: blur(5px);
    }

    .game-fullscreen-btn:hover {
      background: rgba(0, 255, 255, 0.3);
      border-color: #0ff;
      transform: scale(1.1);
      box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    }

    .game-fullscreen-btn i {
      color: #0ff;
    }

    /* Restart Button */
    .game-restart-btn {
      width: 40px;
      height: 40px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 8px;
      color: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      transition: all 0.3s ease;
      backdrop-filter: blur(5px);
    }

    .game-restart-btn:hover {
      background: rgba(255, 165, 0, 0.3);
      border-color: #ffa500;
      transform: scale(1.1);
      box-shadow: 0 0 15px rgba(255, 165, 0, 0.5);
    }

    .game-restart-btn i {
      color: #ffa500;
    }

    .sidebar {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .ad-space {
      background: rgba(255, 255, 255, 0.05);
      text-align: center;
      min-height: 300px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border: 2px dashed rgba(0, 255, 255, 0.3);
    }

    .ad-space i {
      font-size: 2rem;
      color: #0ff;
      margin-bottom: 15px;
    }

    .ad-space p {
      color: #94a3b8;
      font-size: 0.9rem;
    }

    .game-info-card {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 12px;
      padding: 20px;
    }

    .game-title {
      font-size: 1.8rem;
      margin: 0 0 15px;
      color: #fff;
      text-shadow: 0 0 10px rgba(255,255,255,0.3);
    }

    .game-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 20px;
    }

    .game-rating, .game-category, .game-achievements {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, 0.08);
      padding: 6px 12px;
      border-radius: 15px;
      font-size: 0.85rem;
    }

    .game-rating i {
      color: gold;
    }

    /* Original Play Button Style (kept for other potential uses) */
    .play-button {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: linear-gradient(135deg, #0ff, #00bfff);
      color: #001a33;
      border: none;
      padding: 12px 25px;
      font-size: 1.1rem;
      font-weight: 600;
      border-radius: 30px;
      cursor: pointer;
      box-shadow: 0 0 20px rgba(0,255,255,0.5);
      transition: transform 0.2s, box-shadow 0.2s;
      margin-bottom: 20px;
      width: 100%;
      justify-content: center;
    }

    .play-button:hover {
      transform: translateY(-3px);
      box-shadow: 0 0 25px rgba(0,255,255,0.7);
    }

    .game-description {
      line-height: 1.6;
      color: #cbd5e1;
      font-size: 0.9rem;
    }

    .game-categories {
      margin-top: 15px;
    }

    .category-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .category-tag {
      background: rgba(0, 255, 255, 0.1);
      color: #0ff;
      padding: 4px 12px;
      border-radius: 15px;
      font-size: 0.8rem;
      border: 1px solid rgba(0, 255, 255, 0.3);
    }

    /* Popular Searches Section - IMPROVED */
    .popular-searches {
      margin-top: 20px;
    }

    .popular-searches h3 {
      margin-bottom: 15px;
      color: #fff;
      font-size: 1.2rem;
    }

    .search-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .search-tag {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, 0.08);
      padding: 8px 12px;
      border-radius: 20px;
      transition: all 0.3s ease;
      cursor: pointer;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .search-tag:hover {
      background: rgba(0, 255, 255, 0.15);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 255, 255, 0.2);
      border-color: rgba(0, 255, 255, 0.4);
    }

    .search-tag i {
      color: #0ff;
      font-size: 0.9rem;
    }

    .search-tag span {
      font-size: 0.85rem;
      color: #cbd5e1;
    }

    .top-games {
      margin-top: 30px;
    }

    /* Top Games Grid - Updated to match game-card style */
    .top-games-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 15px;
      margin-top: 15px;
    }

    .top-game-card {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 12px;
      overflow: hidden;
      text-align: center;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      cursor: pointer;
    }

    .top-game-card:hover {
      transform: translateY(-6px);
      box-shadow: 0 6px 18px rgba(0,0,0,0.4);
    }

    .top-game-card img {
      width: 100%;
      aspect-ratio: 1 / 1;
      object-fit: cover;
      display: block;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .top-game-card .title {
      font-size: 0.8rem;
      margin: 8px;
      line-height: 1.3;
      color: #f5f8ff;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }

    .related-games-section {
      margin: 40px 0;
    }

    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
	  margin-top: 20px;
    }

    .section-title {
      font-size: 1.5rem;
      margin: 0;
      color: #fff;
      text-shadow: 0 0 10px rgba(255,255,255,0.3);
	  padding-bottom: 20px;
    }

    .view-all {
      color: #0ff;
      text-decoration: none;
      font-size: 0.9rem;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .games-row {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 20px;
    }

    .developer-games {
      margin: 40px 0;
    }

    .category-stats {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
      margin-top: 20px;
    }

    .category-stat {
      background: rgba(255, 255, 255, 0.05);
      padding: 15px;
      border-radius: 10px;
      text-align: center;
    }

    .stat-number {
      font-size: 1.5rem;
      font-weight: 700;
      color: #0ff;
      margin-bottom: 5px;
    }

    .stat-label {
      font-size: 0.8rem;
      color: #cbd5e1;
    }

    .game-details-section {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 16px;
      padding: 30px;
      margin: 20px 0 0 0;
    }

    .details-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 30px;
    }

    .detail-block h3 {
      color: #0ff;
      margin-bottom: 15px;
      font-size: 1.2rem;
    }

    .detail-block p {
      line-height: 1.6;
      color: #cbd5e1;
    }

    /* Responsive */
    @media (max-width: 1200px) {
      .game-layout {
        grid-template-columns: 200px 1fr 200px;
      }
    }

    @media (max-width: 1024px) {
      .game-layout {
        grid-template-columns: 1fr;
        gap: 20px;
      }
      
      .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
      }
      
      .top-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      }
    }

    @media (max-width: 768px) {
      .game-title {
        font-size: 1.5rem;
      }
      
      .sidebar {
        grid-template-columns: 1fr;
      }
      
      .category-stats {
        grid-template-columns: 1fr;
      }
      
      .details-grid {
        grid-template-columns: 1fr;
      }
      
      .top-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
      }
      
      .search-tags {
        gap: 8px;
      }
      
      .search-tag {
        padding: 6px 10px;
      }
      
      /* Responsive styles for play button in game placeholder */
      .game-placeholder .play-button {
        padding: 14px 30px;
        font-size: 1.2rem;
      }
      
      .game-fullscreen-btn,
      .game-restart-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
      }
      
      .game-controls-overlay {
        bottom: 10px;
        right: 10px;
        gap: 8px;
      }
      
      .game-placeholder i {
        font-size: 3rem;
      }
      
      .game-placeholder h3 {
        font-size: 1.3rem;
      }
    }

    @media (max-width: 480px) {
      .games-row {
        grid-template-columns: repeat(2, 1fr);
      }
      
      .top-games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
      }
      
      .top-game-card .title {
        font-size: 0.75rem;
      }
      
      .search-tags {
        justify-content: center;
      }
      
      /* Mobile styles for play button in game placeholder */
      .game-placeholder .play-button {
        padding: 12px 25px;
        font-size: 1.1rem;
        gap: 8px;
      }
      
      .game-fullscreen-btn,
      .game-restart-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
      }
      
      .game-placeholder i {
        font-size: 2.5rem;
      }
      
      .game-placeholder h3 {
        font-size: 1.2rem;
      }
      
      .game-placeholder p {
        font-size: 0.9rem;
      }
    }

    @media (max-width: 360px) {
      .top-games-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      
      .game-placeholder .play-button {
        padding: 10px 20px;
        font-size: 1rem;
      }
      
      .game-fullscreen-btn,
      .game-restart-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
      }
    }