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

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

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

.menu-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2vh 2vw;
  padding-bottom: 20px;
  align-items: center;
  gap: 20px;
}

.title-group {
  width: 100%;
  text-align: center;
  margin-top: 2vh;
  /*margin-bottom: -72px;*/
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0vh;
  max-width: 500px;
}

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

.social-icons {
  position: fixed;
  right: 2vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: -3.5vh;
  z-index: 100;
}

.social-icon {
  width: clamp(50px, 4vw, 70px);
  height: clamp(50px, 4vw, 70px);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  /* transform: scale(1.1); */
}

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

/*Link Items*/
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.link-items {
  position: absolute;
  right: 0;
  bottom: 1.25rem;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: flex-end;
  justify-content: center;
  gap: 3rem 1.5rem;
  padding: 1rem;
}

.link-item:hover {
  transform: scale(1.08);
  transition: transform 0.25s ease;
}

.link-item {
  transition: transform 0.25s ease;
}

.link-divider {
  width: 2px;
  height: 140px;
  border-left: 2px dashed #ccc;
  align-self: center;
  opacity: 0.5;
}

.link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.link-circle {
  position: relative;
  width: 160px;
  height: 180px;
  overflow: hidden;
}

/* Ring 1 — outer, full solid */
.link-ring-1 {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  object-fit: cover;
  opacity: 1;
  width: 100%;
  height: 100%;
}

/* Ring 2 — middle, nhiều răng cưa dùng repeating-conic-gradient */
.link-ring-2 {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3AFFB0, #D5D5D5);
  -webkit-mask: repeating-conic-gradient(#000 0deg 4deg, transparent 4deg 6deg),
  radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  mask: repeating-conic-gradient(#000 0deg 4deg, transparent 4deg 6deg),
  radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  -webkit-mask-composite: intersect;
  mask-composite: intersect;
  opacity: 0.9;
}

/* Ring 3 — inner, 70% arc, spinning */
/* Uses conic-gradient + radial-gradient mask to create a partial arc ring */
.link-ring-3 {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: conic-gradient(var(--color) 252deg, transparent 252deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  animation: spin 2s linear infinite;
}

/* Center content */
.link-content {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.link-content-1 {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-ms {
  color: #ffff;
  font-weight: 700;
  font-size: 28px;
}

.link-ms-1 {
  color: #ffff;
  font-weight: 700;
  font-size: 20px;
}

.link-ms.link-title-1, .link-ms-1.link-title-1 {
  color: #090AA4;
}

.link-ms.link-title-2, .link-ms-1.link-title-2 {
  color: #a4099a;
}

.link-ms.link-title-3, .link-ms-1.link-title-3 {
  color: #13d338;
}

.link-ms.link-title-4, .link-ms-1.link-title-4 {
  color: #ff832b;
}

.link-ms.link-title-5, .link-ms-1.link-title-5 {
  color: #eaca14;
}

.link-ms.link-title-6, .link-ms-1.link-title-6 {
  color: #2aaeff;
}

.link-label {
  background: linear-gradient(180deg, #19996F 0%, #2AFFB9 100%);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  padding: 5px 18px;
  border-radius: 999px;
  letter-spacing: 1px;
  box-shadow: 0 0 10px 0 #129F71, 0 -4px 4px 0 #1AF4AD inset, 0 4px 4px 0 #1AF4AD inset;
}

.banner {
  display: block;
}

.banner-mobile {
  display: none;
}

/*Link Section*/
.link-section {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}

.link-section img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.link-join {
  margin-top: -6rem;
  background: #fff;
  position: relative;
  border: 8px solid #FFA4D1;
  border-radius: 16px;
  padding: 40px 40px 0 40px
}

.link-join-img {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
}

/*End Link Section*/
/*Download*/
.download-section {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.download-section .image {
  max-width: 62.5rem;
}

.download-section .image img {
  width: 100%;
  height: 100%;
}

.download-btn {
  position: absolute;
  display: flex;
  gap: 1rem;
  align-items: center;
  bottom: 2.5rem;
  left: 6rem;
}

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

.download-btn .button-download-ios {
  max-width: 140px;
  width: 100%;
}

.download-btn .button-download-android {
  max-width: 140px;
  width: 100%;
}

.download-section-mobile {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
}

.download-section-mobile .image {
  max-width: 100%;
  width: 100%;
}

.download-section-mobile .image img {
  width: 100%;
  height: 100%;
}

.download-btn-mobile {
  position: absolute;
  display: flex;
  gap: 16px;
  align-items: center;
  bottom: 1rem;
  right: 5%;
}

.download-btn-mobile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.download-btn-mobile .button-download-ios {
  height: 45px;
  width: 100px;
}

.download-btn-mobile .button-download-android {
  height: 45px;
  width: 100px;
}

/*End Download*/

/* Social Buttons */
.social {
  display: none;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.social-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: space-between;
}

.social-btn-link {
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.social-btn-link img {
  /*height: 44px;*/
  width: 100%;
  display: block;
  object-fit: contain;
}

.social-btn-link:hover {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* End Social Buttons */
@media (max-width: 344px) {
  .download-btn-mobile {
    right: 0;
  }

  .download-btn-mobile .button-download-ios {
    height: 35px;
    width: 100px;
  }

  .download-btn-mobile .button-download-android {
    height: 35px;
    width: 100px;
  }
}

@media (max-width: 1024px) {
  .banner {
    display: none;
  }

  .banner-mobile {
    display: block;
    object-fit: cover;
    object-position: top center;
  }

  .desktop {
    /*background: url("./images/background-mobile.webp") no-repeat center center;*/
  }

  .title-img {
    width: 60%;
  }

  .link-section img {
    width: 100%;
    height: 100%;
  }

  .link-join {
    margin-top: -2.5rem;
    width: 100%;
    padding: 30px 12px 12px;
  }

  .link-items {
    width: 100%;
    gap: 0.5rem;
    padding: 1rem;
    bottom: 0;
  }

  .link-divider {
    display: none;
  }

  .link-circle {
    width: clamp(100px, 27vw, 170px);
    height: clamp(140px, 29.5vw, 170px);
  }

  .link-ms {
    font-size: 1rem;
  }

  .link-label {
    font-size: 0.8rem;
    padding: 3px 12px;
  }

  .download-btn {
    display: none;
  }

  .download-section {
    display: none;
  }

  .download-section-mobile {
    display: flex;
  }

  .social {
    display: flex;
  }

  .download-btn .button-download-ios {
    height: 30px;
  }

  .download-btn .button-download-android {
    height: 30px;
  }

  .social-icons {
    display: none;
  }
}

/* ================== TABLET (768px – 1024px) ============== */
@media (min-width: 768px) and (max-width: 1024px) {
  .link-items {
    gap: 4.5rem 0.5rem;
    bottom: 30px;
  }

  .link-circle {
    width: clamp(100px, 28vw, 200px);
    height: clamp(140px, 32.5vw, 250px);
  }

  .download-btn-mobile .button-download-ios {
    width: 100%;
    height: 80px;
  }

  .download-btn-mobile .button-download-android {
    width: 100%;
    height: 80px;
  }

  .social {
    width: 100%;
  }

  .social-row {
    width: 100%;
  }

  .social-btn-link {
    width: 100%;
  }
}

/* ================== SMALL MOBILE (≤ 767) ============== */
@media (min-width: 481px) and (max-width: 767px) {
  .link-items {
    bottom: 16px;
  }

  .link-circle {
    width: clamp(100px, 27vw, 170px);
    aspect-ratio: 1 / 1;
    height: auto !important;
  }
}

/* ================== SMALL MOBILE (430 ≤ 480) ============== */
@media (min-width: 430px) and (max-width: 480px) {
  .link-items {
    bottom: 10px;
    gap: 2.5rem 0.5rem;
  }
}

/* ================== SMALL MOBILE (360 ≤ 429) ============== */
@media (min-width: 360px) and (max-width: 429px) {
  .link-items {
    bottom: 0;
    gap: 1.3rem 0.5rem
  }
}

/* ================== SMALL MOBILE (321 ≤ 359) ============== */
@media (min-width: 321px) and (max-width: 359px) {
  .link-items {
    bottom: 5px;
    gap: 1rem 0.5rem;
  }
}

/* ================== SMALL MOBILE (≤ 320) ============== */
@media (max-width: 320px) {
  .link-items {
    bottom: 15px;
    gap: 1.2rem 0.1rem;
  }

  .link-circle {
    width: clamp(87px, 28vw, 220px);
    height: clamp(101px, 32.5vw, 280px);
  }

  .link-ms {
    font-size: 0.7rem;
  }

  .link-ms-1 {
    font-size: 0.8rem;
  }
}

/* ================== Custom: Samsung Galaxy S20 Ultra ============== */
@media screen and (width: 412px) and (height: 915px) and (-webkit-device-pixel-ratio: 3.5) {
  .link-items {
    bottom: 10px;
    gap: 1.8rem 0.5rem;
  }
}

/* ================== Custom: iPad Pro ============== */
@media (min-width: 1024px) and (max-width: 1024px) and (max-height: 1366px) {
  .link-items {
    gap: 6rem 0.5rem;
    bottom: 55px;
  }

  .link-circle {
    width: clamp(100px, 28vw, 255px);
    height: clamp(140px, 32.5vw, 340px);
  }

  .link-ms {
    font-size: 3rem;
  }

  .link-ms-1 {
    font-size: 2rem;
  }
}

/* ================== Custom: Surface Pro 7 - Portrait ============== */
@media screen and (width: 912px) and (height: 1368px) and (-webkit-min-device-pixel-ratio: 2) {
  .link-items {
    gap: 4.5rem 0.5rem;
    bottom: 60px;
  }

  .link-circle {
    width: clamp(100px, 28vw, 250px);
    height: clamp(140px, 32.5vw, 300px);
  }

  .link-ms {
    font-size: 3rem;
  }

  .link-ms-1 {
    font-size: 2rem;
  }
}

/* ================== Custom: Surface Dou - Portrait ============== */
@media screen and (width: 540px) and (height: 720px) and (-webkit-device-pixel-ratio: 2.5) {
  .link-items {
    gap: 3.5rem 0.5rem;
    bottom: 30px;
  }

  .link-circle {
    width: clamp(100px, 30vw, 225px);
    height: clamp(140px, 32.5vw, 300px);
  }
}

/* ================== Custom: Galaxy Z Fold 5 - Cover ============== */
@media screen and (width: 344px) and (height: 882px) and (-webkit-min-device-pixel-ratio: 2.625) {
  .link-items {
    bottom: 0;
    gap: 0.2rem;
  }

  .link-circle {
    width: 90px;
    height: 130px;
  }

  .link-ring-1 {
    width: 100%;
    height: 100%;
  }
}

/* ================== Custom: iPhone XR ============== */
@media screen and (width: 414px) and (height: 896px) and (-webkit-device-pixel-ratio: 2) {
  .link-items {
    bottom: 10px;
    gap: 1.8rem 0.5rem;
  }
}

/* ================== Custom: Google Pixel 7 ============== */
@media screen and (width: 412px) and (height: 915px) and (-webkit-device-pixel-ratio: 2.625) {
  .link-items {
    bottom: 10px;
    gap: 1.5rem 0.5rem;
  }
}

/* ================== Custom: ipad air ============== */
@media screen and (width: 820px) and (height: 1180px) and (-webkit-device-pixel-ratio: 2) {
  .link-items {
    gap: 3.5rem 0.5rem;
    bottom: 50px;
  }

  .link-circle {
    width: clamp(100px, 28vw, 215px);
    height: clamp(140px, 32.5vw, 270px);
  }
}

/* ================== Custom: ASUS Zenbook Fold - Portrait ============== */
@media screen and (width: 853px) and (height: 1280px) and (-webkit-device-pixel-ratio: 1.5) {
  .link-circle {
    width: clamp(100px, 28vw, 220px);
    height: clamp(140px, 32.5vw, 280px);
  }
}

/* ================== Custom: Samsung Galaxy A51 ============== */
@media screen and (width: 412px) and (height: 914px) and (-webkit-min-device-pixel-ratio: 2.625) {
  .link-items {
    bottom: 10px;
    gap: 2rem 0.5rem;
  }
}

/* ================== Custom: iPhone 7 Plus / 8 Plus ============== */
@media screen and (width: 414px) and (height: 736px) and (-webkit-device-pixel-ratio: 3) {
  .link-items {
    bottom: 10px;
    gap: 2rem 0.5rem;
  }
}

/* ================== Custom: iPhone 17 Pro ============== */
@media screen and (width: 402px) and (height: 874px) {
  .link-items {
    bottom: 5px;
    gap: 1.8rem 0.5rem;
  }
}

/* ================== Custom: 565 x 1118 ============== */
@media screen and (width: 565px) and (height: 1118px) {
  .link-items {
    bottom: 27px;
    gap: 3.5rem 0rem;
  }

  .link-circle {
    width: clamp(100px, 30vw, 170px);
    aspect-ratio: 1 / 1;
    height: auto !important;
  }
}

/* Samsung Galaxy Z Fold 7 - Main Screen (Unfold) */
@media screen
and (width: 968px)
and (height: 848px)
and (-webkit-device-pixel-ratio: 2) {
  .link-circle {
    width: clamp(100px, 28vw, 250px);
    height: clamp(140px, 32.5vw, 315px);
  }

  .link-items {
    gap: 6rem 0.2rem;
    bottom: 40px;
  }

  .download-btn-mobile {
    bottom: 3rem;
    right: 12%;
  }
}
