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

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

/* ============================================================
   DESKTOP / TABLET
   One fixed 1920x1080 "stage" holds the whole composition.
   JS scales that stage uniformly (scale = min(vw/1920, vh/1080))
   so it always fits the viewport completely, with no scrollbar
   and nothing cut off - no per-device media query needed.
   ============================================================ */

.desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: url("../image/bg-pc.webp") no-repeat center center;
  background-size: cover;
  background-color: #161920;
}

.menu-container {
  position: relative;
  width: 1920px;
  height: 1080px;
  flex-shrink: 0;
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  padding: 22px 38px 20px;
}

.title-group {
  width: 100%;
  text-align: center;
  margin-top: 22px;
  margin-bottom: -72px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-img {
  width: 384px;
  height: auto;
  margin-bottom: 11px;
}

.linkbox-section {
  position: relative;
  z-index: 2;
  height: 300px;
  max-width: 1200px;
  margin: 50px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.frame-section img {
  width: 1200px;
  height: auto;
  margin-top: -40px;
}

.left-links {
  position: absolute;
  left: 40px;
  top: 100%;
  transform: translateY(-50%);
}

.left-link {
  position: relative;
  width: 260px;
  height: 64px;
  margin-bottom: 120px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.left-link:hover {
  transform: scale(1.1);
}

.left-link img {
  width: 100%;
  height: auto;
  display: block;
}

.left-link .ms {
  position: absolute;
  left: 44px;
  top: 75%;
  transform: translateY(-50%);
  color: #fff;
  font-weight: 800;
  font-size: 36px;
}

.left-link .label {
  position: absolute;
  right: 18px;
  top: 80%;
  transform: translateY(-50%);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
}

.left-link.l1 {
  transform: translateX(50px);
}

.left-link.l2 {
  transform: translateX(-50px);
}

.left-link.l3 {
  transform: translateX(50px);
}

.left-link.l1:hover,
.left-link.l2:hover,
.left-link.l3:hover {
  transform: translateX(0) scale(1.1);
}

.right-links {
  position: absolute;
  right: 40px;
  top: 100%;
  transform: translateY(-50%);
}

.right-link {
  position: relative;
  width: 260px;
  height: 64px;
  margin-bottom: 120px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.right-link:hover {
  transform: scale(1.1);
}

.right-link img {
  width: 100%;
  height: auto;
  display: block;
}

.right-link .label {
  position: absolute;
  left: 18px;
  top: 79%;
  transform: translateY(-50%);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
}

.right-link .ms {
  position: absolute;
  right: 36px;
  top: 75%;
  transform: translateY(-50%);
  color: #fff;
  font-weight: 800;
  font-size: 36px;
}

.right-link.r1 {
  transform: translateX(-20px);
}

.right-link.r2 {
  transform: translateX(50px);
}

.right-link.r3 {
  transform: translateX(-12px);
}

.right-link.r1:hover,
.right-link.r2:hover,
.right-link.r3:hover {
  transform: translateX(0) scale(1.1);
}

.download-buttons {
  position: absolute;
  bottom: -246px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 740px;
  z-index: 5;
}

.download-btn {
  display: block;
  width: 240px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.download-btn:hover {
  transform: scale(1.1);
}

.download-btn img {
  width: 100%;
  height: auto;
  display: block;
}

.frame-download img {
  height: auto;
  position: absolute;
  top: 570px;
  padding-bottom: 20px !important;
}

/* Floating support/social icons - anchored to the real viewport edge,
   deliberately kept OUTSIDE the scaled stage so it never scales down
   and its position: fixed keeps working (a transform on an ancestor
   would otherwise turn it into the containing block for position: fixed). */
.social-icons {
  position: fixed;
  right: 2vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.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;
}

/* ============================================================
   MOBILE
   Same idea as desktop: one fixed-width (430px) "stage" holds the
   whole page. JS scales it by width only (scale = vw / 430) and
   sets the wrapper height to match, so the page still scrolls
   normally - it just never needs a per-device breakpoint.
   ============================================================ */

.mobile {
  display: none;
}

@media (max-width: 767px) {
  .desktop {
    display: none !important;
  }

  .mobile {
    display: block;
    position: relative;
    width: 100%;
    overflow-x: hidden;
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
  }

  .mobile::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
        to top,
        transparent 100%,
        transparent 100%,
        rgba(0, 0, 0, 0.1) 45%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.3) 55%,
        rgba(0, 0, 0, 0.4) 60%,
        transparent 0%
      ),
      url("../image/bg-mobile.webp");
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover;
    background-attachment: fixed;
    z-index: -1;
    pointer-events: none;
  }

  .mobile::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      ellipse at center 50%,
      transparent 0%,
      rgba(0, 0, 0, 0.15) 100%
    );
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: multiply;
  }

  .mobile-viewport {
    position: relative;
    width: 100%;
  }

  .mobile-stage {
    position: relative;
    width: 430px;
    transform-origin: top left;
    padding: 18px 14px 24px;
    box-sizing: border-box;
  }

  .mobile-title {
    text-align: center;
  }

  .mobile-title img {
    width: 170px;
    height: auto;
    margin: 0 auto;
  }

  .mobile-banner {
    width: 100%;
    margin-top: 4px;
    position: relative;
    z-index: 1;
  }

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

  .mobile-pill-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 10px 12px;
    margin-top: -36px;
  }

  .mobile-pill {
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.25s ease;
  }

  .mobile-pill:hover {
    transform: scale(1.05);
  }

  .mobile-pill:active {
    transform: scale(0.96);
  }

  .mobile-pill img {
    width: 100%;
    height: auto;
    display: block;
  }

  .mobile-pill .pill-ms,
  .mobile-pill .pill-label {
    position: absolute;
    top: 47%;
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
  }

  .pill-left .pill-ms {
    left: 15%;
    transform: translateY(-50%);
    font-size: 15px;
  }

  .pill-left .pill-label {
    left: 80%;
    transform: translate(-50%, -50%);
    font-size: 10px;
  }

  .pill-right .pill-label {
    left: 20%;
    transform: translate(-50%, -50%);
    font-size: 10px;
  }

  .pill-right .pill-ms {
    right: 12%;
    left: auto;
    transform: translateY(-50%);
    font-size: 15px;
  }

  .pill-download {
    display: flex;
    align-items: center;
  }

  .mobile-frame-download {
    width: 100%;
    margin-top: 16px;
    position: relative;
    z-index: 1;
  }

  .mobile-frame-download img {
    width: 100%;
    height: auto;
    display: block;
  }

  .mobile-social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 16px;
  }

  .mobile-social-btn {
    display: block;
    transition: transform 0.3s ease;
  }

  .mobile-social-btn img {
    width: 100%;
    height: auto;
    display: block;
  }

  .mobile-social-btn:hover {
    transform: scale(1.05);
  }

  .mobile-social-btn:active {
    transform: scale(0.95);
  }
}
