/* Cơ bản */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 20px;
  background: url('./hinhnen/414j.png') no-repeat center center fixed;
  background-size: cover;
  text-align: center;
  overflow-x: hidden;
}

/* Hình nền cho điện thoại */
@media screen and (max-width: 768px) {
  body {
    background-size: cover;
  }
}

h1, h2, p {
  color: #fff;
  text-shadow: 2px 2px 5px #000;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

p {
  margin-bottom: 30px;
  text-shadow: 1px 1px 3px #000;
}

/* Các tab */
.tab-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.tab {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 1px 1px 3px #000;
  transition: background-color 0.3s ease;
}

.tab:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.tab.active {
  background-color: rgba(100, 100, 100, 0.6); /* Xám đậm */
  text-decoration: underline;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Các thẻ game */
.game-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.game-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  width: 300px;
  transition: transform 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3); /* Thêm viền cho các thẻ game */
}

.game-card:hover {
  transform: translateY(-10px);
}

.game-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.game-info {
  padding: 15px;
}

.game-info h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 2px 2px 5px #000;
}

/* Nút Chơi Ngay */
.play-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(255, 193, 7, 0.3); /* Màu nền vàng nhẹ trong mờ */
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 30px;
  text-decoration: none;
  border: 2px solid #FFEB3B; /* Viền vàng */
  text-shadow: 1px 1px 3px #000; /* Tạo hiệu ứng đổ bóng */
  transition: background-color 0.3s, transform 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Thêm bóng cho nút */
}

.play-button:hover {
  background-color: rgba(255, 193, 7, 0.5); /* Thay đổi màu nền khi hover */
  transform: scale(1.05); /* Phóng to nút khi hover */
}

.play-button:active {
  transform: scale(0.95); /* Thu nhỏ khi click */
}

/* 🎶 Tên bài hát */
#song-title-container {
  width: fit-content;
  max-width: 300px; /* Điều chỉnh chiều rộng theo ý muốn */
  margin: 0 auto 5px; /* Giảm khoảng cách dưới để tách biệt với các nút điều khiển */
  background-color: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  font-size: 14px;
  overflow: hidden;
  text-align: center;
  white-space: nowrap; /* Giữ cho tên bài hát không bị xuống dòng */
  text-overflow: ellipsis; /* Nếu tên bài hát dài hơn ô, sẽ cắt và hiển thị "..." */
}

/* 🎵 Nút điều khiển nhạc - phẳng và hiện đại */
.music-control-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column; /* Đặt các phần tử theo chiều dọc */
  align-items: center; /* Căn giữa các phần tử */
  gap: 5px; /* Giảm khoảng cách giữa tên bài hát và các nút */
}

/* Các nút điều khiển nhạc */
.music-control {
  display: flex;
  flex-direction: row; /* Đảm bảo các nút xếp theo hàng ngang */
  gap: 10px; /* Khoảng cách giữa các nút */
  background: rgba(128, 128, 128, 0.35);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.music-control button {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s;
  text-shadow: 1px 1px 3px #000;
}

.music-control button:hover {
  transform: scale(1.2);
}

.music-control button:active {
  transform: scale(0.95);
}

/* Tuyết rơi */
.snowflake {
  position: fixed;
  top: -10px;
  color: #fff;
  font-size: 1em;
  pointer-events: none;
  z-index: 9999;
  animation: fall 40s linear infinite; /* Giữ animation 40s */
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.snowflake {
  position: fixed;
  top: -10px;
  color: #fff;
  font-size: 1em;
  pointer-events: none;
  z-index: 9999;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}


/* Dòng thông tin liên hệ và liên kết */
p {
  color: #fff; /* Màu chữ trắng */
  text-shadow: 1px 1px 3px #000; /* Tạo hiệu ứng bóng cho chữ */
  margin-bottom: 10px; /* Thêm khoảng cách dưới giữa các dòng */
}

a {
  color: #FFEB3B; /* Màu vàng nhẹ cho liên kết */
  text-decoration: none; /* Không gạch dưới */
  font-weight: bold; /* Làm chữ đậm */
  transition: color 0.3s ease; /* Hiệu ứng chuyển màu mượt mà */
}

a:hover {
  color: #FFD700; /* Màu vàng sáng hơn khi hover */
}

a:active {
  color: #FF8C00; /* Màu vàng cam khi click */
}

body {
  transition: background-image 1s ease-in-out;
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 15px 10px;
  margin-top: 40px;
  color: #fff;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.2);
  text-shadow: 1px 1px 3px #000;
}

#toggleTab {
  position: fixed;
  bottom: 70px;
  right: 10px;
  background: #ffffffcc;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  display: none; /* Ẩn thanh bật ban đầu */
  z-index: 9999;
  max-width: 220px;
}

#toggleBtn {
  position: fixed;
  bottom: 10px;
  right: 10px;
  padding: 10px 15px;
  background: rgba(0, 123, 255, 0.7); /* Màu nền với độ mờ */
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  z-index: 9999;
}

#leftTabToggle {
  position: fixed;
  left: 10px;
  top: 50px;
  font-size: 30px;
  cursor: pointer;
  z-index: 1000;
  background: rgba(51, 51, 51, 0.8); /* Màu nền đen mờ */
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  display: block; /* Đảm bảo icon luôn hiển thị */
}

#leftTab {
  position: fixed;
  left: 0px; /* Ban đầu ẩn thanh bên trái bằng cách dịch chuyển sang bên trái */
  top: 0;
  width: 250px;
  height: 100%;
  background-color: rgba(30, 30, 30, 0.9); /* Màu nền tab đen mờ */
  color: white;
  transition: transform 0.3s ease; /* Thêm transition cho hiệu ứng trượt mượt */
  padding: 15px;
  z-index: 999;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5); /* Đổ bóng để tạo chiều sâu */
  transform: translateX(-100%); /* Ban đầu ẩn thanh bên trái bằng cách dịch chuyển nó ra ngoài */
}

#leftTab.open {
  transform: translateX(0); /* Khi tab mở sẽ trượt vào */
}

#leftTabToggle.open {
  display: none; /* Ẩn icon khi thanh bên trái mở */
}
