@import "menu.css";
* {
    margin: 0;
    padding: 0;
  }
  *::-webkit-scrollbar {
    display: none;
  }
  :root {
    --background: #f2f2f2;
    --heart: #ff7025;
    --heart-hover: #22272e;
    --text: #000000;
    --additive: #fff;
    --border:#b9cbe1;
    --shadow: 0 4px 2px -2px rgba(0, 0, 0, 0.2);
    --header-height: 48px;
    --hiệu-ứng: linear-gradient(45deg, #d4fff8, #ffdeff, #ffe6e6),
      linear-gradient(45deg, #007a65, #7f0e7f, #ff8983);
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --background: #22272e;
      --heart: #ffffff;
      --heart-hover: #ff7025;
      --text: #c5d1de;
      --additive: #ffffff1a;
      --border:#444c56;
      --shadow: 0 4px 2px -2px rgba(0, 0, 0, 0.2);
      --hiệu-ứng: linear-gradient(45deg, #005446, #39003f, #590000),
        linear-gradient(45deg, #007a65, #7f0e7f, #ff8983);
    }
  }
 
  body {
    background-color: var(--background);
    color: var(--text);
    overflow-x: hidden;
    position: sticky;
    
  }
  
.games-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding-top: var(--header-height);
    
  }
  .game {
    position: relative;
    width: 210px;
    margin: 10px; /* Adjust margin for spacing */
    padding: 10px;
    text-align: center;
    transition: background-color 0.3s ease;
    box-shadow: 0.2rem 0.2rem 0.2rem rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    border: 1px solid var(--border);
}

.game.selected,.game:hover {
  background-color: var(--heart-hover); /* Màu nền khi game được chọn */
  text-shadow: -1px 0 red, 0 1px red, 1px 0 red, 0 -1px red, -1px -1px red,
    1px 1px red, -1px 1px red, 1px -1px red;
  color: #fff;
}

.game img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 5 / 4; /* Tỷ lệ 5:4 */
    height: auto;
    border-radius: 5px;
    cursor: pointer;
}

  #gameOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
  }

  #closeButton {
    position: absolute;
    top: 0px;
    z-index: 1001;
    font-size: 10px;
    cursor: pointer;
    background-color: var(--additive);
    padding: 5px 10px;
  }

  #gameFrame {
    width: 100%;
    height: 100vh;
    border: none;
    position: fixed;
    top: 0;
    left: 0;
  }
  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px 0 20px 0;
    gap: 10px; /* Điều chỉnh khoảng cách giữa các phần tử */
}

#prevBtn, #nextBtn, #paginationInfo {
    flex: 0 0 auto; /* Đảm bảo các phần tử không co giãn */
    text-align: center; /* Canh giữa nội dung bên trong phần tử */
}
.pagination button {
  padding: 5px 10px;
  font-size: 16px;
  cursor: pointer;
  background-color: var(--additive);
  border-radius: 4px;
  border: 1px solid var(--border);
}
.pagination button:hover  {
  background-color: var(--heart-hover);
  color: #fff;
}
.pagination button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
@media (max-width: 768px) {
  .game {
      width: calc(100% - 20px); /* Each game takes up 100% of the width minus some margin */
  }
}
