/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ảnh/iframe không bao giờ tràn ngang */
img {
  max-width: 100%;
}

/* DESKTOP CSS */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  color: #fff;
}

.desktop {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background: url("./images/background.png") no-repeat center center;
  background-size: cover;
  background-color: #161920;
  position: relative;
  overflow-x: hidden;
}

/* Stage: khung thiết kế gốc, được JS scale lại để luôn vừa 1 màn hình trên PC */
.stage {
  width: 100%;
}

.menu-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2vw 3vw;
  align-items: center;
}

.logo {
  /*max-width: 350px;*/
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-mobile {
  display: none;
}

.banner {
  position: relative;
  width: 100%;
  height: auto;
  max-width: 780px;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.banner-coming {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

.banner-coming img {
  width: 100%;
  height: auto;
  display: block;
}

.title {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 15px #FFA808;
}

.country {
  display: flex;
  gap: 80px;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
  padding-bottom: 60px;
}

.country-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.country-gif {
  width: 200px;
  height: 200px;
}

.country-item-1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.country-gif-1 {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.country-gif img, .country-gif-1 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.country-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: #FFF;
  text-align: center;
}

.country-mobile {
  display: none;
  align-content: center;
  gap: 40px;
  justify-content: center;
  width: 100%;
  /*padding-top: 40px;*/
}

.country-mobile-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.country-mobile-gif {
  width: 150px;
  height: 150px;
}

.country-mobile-gif img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ================== MOBILE + TABLET (≤ 1024px) ============== */
@media (max-width: 1024px) {
  .desktop {
    background: url(./images/H5.png) no-repeat center top;
    background-size: cover;
    background-color: #161920;
    min-height: 100vh;
    height: auto;
  }

  .menu-container {
    max-width: 100%;
    gap: 32px;
  }

  .banner {
    max-width: 100%;
  }

  .title {
    font-size: 18px;
  }
}

/* ================== MOBILE ONLY (< 768px) ============== */
@media (max-width: 767px) {
  .country {
    display: none;
  }

  .country-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .country-title {
    font-size: 18px;
    text-align: center;
  }

  .country-mobile-gif {
    width: 170px;
    height: 170px;
  }
}

/* ================== TABLET (768px – 1024px) ============== */
@media (min-width: 768px) and (max-width: 1024px) {
  .menu-container {
    gap: 40px;
  }

  .title {
    font-size: 22px;
  }

  .country {
    display: flex;
    gap: 40px;
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .country-gif,
  .country-gif-1 {
    width: 130px;
    height: 130px;
  }

  .country-title {
    font-size: 16px;
  }

  .country-mobile {
    display: none;
  }
}

/* ================== SMALL MOBILE (≤ 480px) ============== */
@media (max-width: 480px) {
  .menu-container {
    gap: 20px;
    padding: 5vw 6vw;
  }

  .title {
    font-size: 15px;
  }

  .country-mobile {
    flex-wrap: unset;
    gap: 24px 40px;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .country-title {
    font-size: 15px;
  }

  .country-mobile-gif {
    width: 150px;
    height: 150px;
  }
}

/* ================== SMALL MOBILE (320 ≤ 480) ============== */
@media (min-width: 321px) and (max-width: 480px) {
  .menu-container {
    padding: 14vw 6vw;
  }

  .country-mobile {
    gap: 24px 31px;
  }

  .country-mobile-gif {
    width: 96px;
    height: 96px;
  }

  .country-title {
    font-size: 15px;
  }
}

/* ================== SMALL MOBILE (≤ 320) ============== */
@media (max-width: 320px) {
  .country-mobile {
    gap: 24px 20px;
  }

  .country-mobile-gif {
    width: 80px;
    height: 80px;
  }

  .country-title {
    font-size: 13px;
  }
}

/* ================== DESKTOP FINE-TUNE (≥ 1025px) ============== */
@media (min-width: 1025px) {
  .title {
    font-size: 24px;
  }

  /* Khóa .desktop đúng bằng chiều cao viewport, không cho scroll dọc:
     .stage bên trong sẽ được JS scale để vừa khít trong khung này. */
  .desktop {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  /* Thiết kế gốc cố định 1920px (khớp background.png) rồi scale bằng JS,
     căn giữa tuyệt đối trong .desktop bằng translate(-50%, -50%). */
  .stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1920px;
    transform-origin: center center;
  }

  /* Padding dùng px cố định thay vì vw để không phụ thuộc vào độ rộng
     màn hình thật — toàn bộ tỉ lệ đã được xử lý bởi transform: scale(). */
  .menu-container {
    padding: 38px 58px;
  }
}

/* ================== Custom: iPad Pro ============== */
@media (min-width: 1024px) and (max-width: 1024px) and (max-height: 1366px) {
  .country-mobile {
    gap: 24px 70px;
  }

  .country-mobile-gif {
    width: 350px;
    height: 350px;
  }

  .country-title {
    font-size: 25px;
  }

  .country-gif,
  .country-gif-1 {
    width: 200px;
    height: 200px;
  }
}

/* ================== Custom: Surface Pro 7 - Portrait ============== */
@media screen and (width: 912px) and (height: 1368px) and (-webkit-min-device-pixel-ratio: 2) {
  .country-mobile {
    gap: 24px 70px;
  }

  .country-mobile-gif {
    width: 320px;
    height: 320px;
  }

  .country-gif, .country-gif-1 {
    width: 180px;
    height: 180px;
  }

  .country-title {
    font-size: 25px;
  }
}

/* ================== Custom: Surface Dou - Portrait ============== */
@media screen and (width: 540px) and (height: 720px) and (-webkit-device-pixel-ratio: 2.5) {
  .country-mobile-gif {
    width: 100px;
    height: 100px;
  }

  .country-title {
    font-size: 12px;
  }
}

/* ================== Custom: Galaxy Z Fold 5 - Cover ============== */
@media screen and (width: 344px) and (height: 882px) and (-webkit-min-device-pixel-ratio: 2.625) {
  .menu-container {
    padding: 13vw 6vw;
  }

  .country-mobile {
    gap: 24px 15px;
    padding-top: 38px;
  }
}

/* ================== Custom: Samsung Galaxy A51 ============== */
@media screen and (width: 412px) and (height: 914px) and (-webkit-min-device-pixel-ratio: 2.625) {
  .menu-container {
    gap: 40px;
    padding: 15vw 6vw;
  }
}

/* ================== Custom: Nest Hub ============== */
@media screen and (width: 1024px) and (height: 600px) and (-webkit-min-device-pixel-ratio: 2) {
  .country-mobile-gif {
    width: 320px;
    height: 320px;
  }
}

/* ================== Custom: ASUS Zenbook Fold - Portrait ============== */
@media screen and (width: 853px) and (height: 1280px) and (-webkit-device-pixel-ratio: 1.5) {
  .country-gif, .country-gif-1 {
    width: 170px;
    height: 170px;
  }

  .country-title {
    font-size: 19px;
  }
}
