* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #e1e5ec;
  color: #1a202c;
  overflow-x: hidden; /* Prevent horizontal scroll on small screens */
}

.circle-bg-1, .circle-bg-2, .circle-bg-3, .circle-bg-4, .circle-bg-5 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.circle-bg-1 {
  width: 300px; height: 300px;
  background: rgba(255, 182, 110, 0.15);
  top: 80%; left: -5%;
}

.circle-bg-2 {
  width: 400px; height: 400px;
  background: rgba(203, 213, 225, 0.3);
  top: 50%; right: 0%;
}

.circle-bg-3 {
  width: 400px; height: 400px;
  background: rgba(203, 213, 225, 0.3);
  top: 80%; right: 10%;
}

.circle-bg-4 {
  width: 300px; height: 300px;
  background: rgba(255, 182, 110, 0.15);
  top: 40%; left: 35%;
}

.circle-bg-5 {
  width: 500px; height: 500px;
  background: rgba(255, 182, 110, 0.15);
  top: 45%; left: 5%;
}

.slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  max-height: 400px;
  margin-bottom: 2rem; /* Thêm khoảng cách dưới slider */
}

/* Slider cho máy tính */
.desktop-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: block; /* Default to block for desktop */
}

.desktop-slider .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.desktop-slider .slide.active {
    opacity: 1;
}

.desktop-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.desktop-slider .caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 18px;
}

/* Slider cho điện thoại */
.mobile-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    display: none; /* Default to none for mobile */
}

.mobile-slider .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.mobile-slider .slide.active {
    opacity: 1;
}

.mobile-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-slider .caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
}

/* Responsive design for main slider */
@media (max-width: 768px) {
    .desktop-slider {
        display: none;
    }

    .mobile-slider {
        display: block;
    }

    h1 {
        font-size: 24px;
        margin: 20px 0;
    }
}

/* Animation */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}


.bottom-content {
  max-width: 1400px;
  margin: 0 auto 4rem;
  padding: 0 1rem 2rem; /* Thêm padding dưới */
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
}

.qr-card {
  background: hwb(206 8% 82%);
  border-radius: 16px;
  box-shadow: 0 5px 20px #0008;
  color: white;
  flex: 1 1 400px; /* Adjusted flex-basis for better responsiveness */
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem 1rem 1.1rem 1rem;
  align-items: center;
  font-size: larger;
  line-height: 1.3;
  min-height: 600px; /* Fixed height for consistency */
}

.qr-wrapper {
  background: hwb(206 8% 82%);
  border-radius: 12px;
  padding: 0.5rem;
  max-width: 360px;
  box-shadow: 0 3px 8px #0009;
  flex-shrink: 0;
}

.qr-wrapper img {
  width: 100%;
  display: block;
  border-radius: 10px;
  user-select: none;
}

.qr-text {
  flex: 1 1 auto;
  padding: 0 1rem; /* Added horizontal padding for text */
  text-align: center;
  font-size: larger;
}

.qr-text small,
.qr-text a {
  font-weight: 600;
  color: #78bde5;
  text-decoration: none;
}

.qr-text a:hover {
  text-decoration: underline;
}

.qr-bot-handle {
  margin-top: 0.2rem;
  font-weight: 700;
  font-size: larger;
}

.links-container {
  flex: 2 1 600px; /* Allows links container to take more space */
  display: flex;
  flex-wrap: wrap;
  gap: 2rem; /* Adjusted gap for better spacing */
  justify-content: center; /* Center items */
  align-items: flex-start; /* Align items to the top */
}


.link-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  flex: 1 1 350px; /* Increased from 280px, allows cards to grow */
  max-width: 450px; /* Max width for individual link sections */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.link-section-header {
  background: linear-gradient(135deg, #3a048d, #7a36ff);
  color: white;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  font-size: larger;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  user-select: none;
}

.link-section-body {
  padding: 1rem 1.3rem 1.2rem 1.3rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: larger;
  color: #222;
}

.link-column {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1 1 40%;
}

.link-column strong {
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
  color: #111;
}

.link-column a {
  color: #2d4ade;
  text-decoration: none;
  border-bottom: 1px solid #dcdcdc;
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
  text-transform: uppercase;
  font-weight: 600;
  font-size: small;
  word-break: break-word; /* Prevent long URLs from overflowing */
}

.link-column a:hover {
  color: #7a36ff;
  border-color: #7a36ff;
}

/* Footer styles */
.footer {
  background-color: #2a3048;
  color: #ffffff;
  padding: 20px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  flex-wrap: wrap;
}

.footer-text {
  flex: 1;
  font-size: 0.9em;
  line-height: 1.5;
  text-align: right;
  padding-right: 20px;
}

.footer-text p {
  margin: 0;
}

.footer-copyright {
  font-size: 0.85em;
  opacity: 0.8;
  text-align: left;
}

.footer-copyright p {
  margin: 0;
}

@media (max-width: 1200px) {
  .links-container {
    justify-content: center; /* Center link sections when there's less space */
  }
  .link-section {
    max-width: 400px; /* Slightly reduce max-width for better fit */
    flex: 1 1 300px; /* Allow sections to shrink a bit */
  }
}

@media (max-width: 900px) {
  /* Removed .games-list as it's now .games-grid and .games-slider handled by dedicated media query */
  .bottom-content {
    flex-direction: column; /* Stack QR card and links container vertically */
    align-items: center; /* Center them horizontally */
  }
  .qr-card {
    width: 90%; /* Make QR card take more width */
    max-width: 380px; /* Limit max-width to avoid stretching too wide */
    min-height: auto; /* Allow height to adjust */
    height: auto;
    padding-bottom: 1.5rem; /* Add some padding at the bottom */
  }
  .links-container {
    justify-content: center;
    width: 95%; /* Make link container take more width */
    max-width: 700px; /* Max width for the entire link section block */
    gap: 2rem; /* Adjusted gap between link sections */
  }
  .link-section {
    flex: 1 1 100%; /* Allow link sections to stack on top of each other */
    max-width: 450px; /* Keep a reasonable max-width for individual sections */
  }
  .footer-content {
    flex-direction: column; /* Stack items vertically */
    text-align: center;
  }
  .footer-text {
    text-align: center;
    padding-right: 0;
    margin-bottom: 15px;
  }
  .footer-copyright {
    text-align: center;
  }
}

@media (max-width: 480px) {
  /* .games-list removed, handled by games-grid/slider */
  .qr-card {
    width: 95%; /* Even wider on very small screens */
    font-size: large;
    padding: 1rem 0.8rem;
  }
  .qr-text {
    font-size: larger;
  }
  .link-section {
    flex-basis: auto; /* Let it shrink as much as needed */
    width: 95%; /* Take full width minus padding */
    max-width: none; /* No max-width restriction on very small screens */
  }
  .link-section-body {
    flex-direction: column; /* Stack columns within link sections */
    gap: 1rem;
    padding: 0.8rem 1rem;
  }
  .link-column {
    gap: 0.6rem;
    font-size: small;
  }
  .link-column strong {
    font-size: larger;
    margin-bottom: 0;
  }
  .link-column a {
    font-size: small;
  }

  .slider-container {
    aspect-ratio: 3/2; /* Adjust aspect ratio for mobile phones */
  }
}
.footer-logo {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #1b1d2c;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 1000;
    overflow: hidden;
    text-align: center;
    color: white;
    flex-direction: column;
}

.footer-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Thay đổi từ 'fill' thành 'cover' */
    border-radius: 50%; /* Thêm dòng này để đảm bảo ảnh tròn */
}