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

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.menu-container {
  display: flex;
  flex-direction: column;
  flex: 1; /* Chiếm toàn bộ không gian còn lại */
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 2vh 2vw;
  padding-bottom: 20px;
}

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

.title-group {
  width: 100%;
  text-align: center;
  margin-top: 2vh;
  margin-bottom: 8vh;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0vh;
}

.title-img {
  width: clamp(200px, 25vw, 380px);
  height: auto;
  margin-bottom: 1vh;
}

.subtitle-img {
  width: clamp(250px, 54vw, 652px);
  height: auto;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3vw;
  margin: 0 auto;
  padding: 0 2vw;
}

.image-section {
  display: flex;
  gap: 2vw;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin-top: -80px;
}

.image-container {
  flex: 1;
  max-width: 500px;
  position: relative;
  margin-right: 80px;
}

.image-container.left img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.image-container.right {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.image-container.right > img {
  width: 100%;
  height: auto;
  display: block;
}

.link-buttons-container {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 400px;
  z-index: 10;
}

.link-button-row {
  display: flex;
  gap: 1vw;
  justify-content: center;
}

.link-button {
  background: linear-gradient(135deg, #434343 0%, #525252 100%);
  border-radius: 12px;
  padding: 3px;
  min-width: clamp(120px, 10vw, 160px);
  height: 100px;
  border: 2px solid #20ff53;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.link-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(245, 234, 39, 0.8);
}

.signal-strength {
  display: flex;
  align-items: center;
  color: rgba(245, 234, 39, 0.8);
  font-size: clamp(10px, 0.8vw, 12px);
  gap: 0.3vw;
}

.aaaa {
  display: flex;
  flex-direction: column;
  gap: 1.5vh;
}

.link-button-row {
  display: flex;
  gap: 1vw;
  justify-content: center;
}

.link-button {
  background: linear-gradient(135deg, #3a3a3a 0%, #171717 100%);
  border-radius: 12px;
  padding: 3px;
  min-width: clamp(120px, 10vw, 160px);
  height: 100px;
  border: 2px solid #ffef77;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.link-header {
  background: linear-gradient(135deg, #525252 0%, #434343 100%);
  border-radius: 10px;
  padding: 0.5vh 1vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* border: 1px solid #20ff53; */
  width: fit-content;
  margin-bottom: 0.5vh;
}

.link-text-pc {
  color: #ffef77;
  font-size: clamp(14px, 1.2vw, 18px);
  margin: 0 5px -8px;
  font-family: Arial, sans-serif;
}

.link-text {
  color: #ffef77;
  /* font-weight: bold; */
  font-size: clamp(14px, 1.2vw, 18px);
  margin: auto;
  font-family: Arial, sans-serif;
}

.truycap {
  width: clamp(60px, 5vw, 80px);
  height: auto;
  cursor: pointer;
}

.social-icons {
  position: fixed;
  right: 1vw;
  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;
}

.footer {
  background: linear-gradient(180deg, #434343 0%, #242424 100%);
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
  position: relative;
  height: 100px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: auto auto auto auto auto;
  grid-template-areas: "text ios android qr avatar";
  align-items: center;
  justify-content: center;
  gap: clamp(15px, 0vw, 40px);
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  position: relative;
}

.footer .text-download {
  grid-area: text;
  height: auto;
  width: 200px;
  object-fit: contain;
  margin-right: 22px;
}

.footer .img-ios {
  grid-area: ios;
  height: auto;
  width: auto;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.footer .img-android {
  grid-area: android;
  height: auto;
  width: auto;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.footer .img-QR {
  margin-top: -50px;
  margin-left: 40px;
  grid-area: qr;
  height: auto;
  width: 156px;
  object-fit: contain;
}

.footer .img-mobile {
  margin-top: -64px;
  height: 165px;
  width: auto;
  object-fit: contain;
}

/* ============================= */
/* MOBILE STYLES - RESPONSIVE */
/* ============================= */

/* Hide mobile on desktop */
.mobile {
  display: none;
}

/* Show mobile on small screens */
@media (max-width: 768px) {
  .desktop {
    display: none !important;
  }

  .mobile {
    display: block;
    width: 100%;
    position: relative;
    background: url("../image/bg-mobile.png") no-repeat center center;
    background-size: cover;
    overflow: hidden;
    /* padding-left: ; */
  }
}

/* Mobile Container - Updated to use flexbox */
.mobile-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0px 12px;
  position: relative;
}

/* Mobile Sections - Updated to use relative positioning */
.mobile-section-1 {
  width: 100%;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 15px;
}

.mobile-title-img {
  width: 70%;
  max-width: 280px;
  height: auto;
}

.mobile-section-2 {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.mobile-subtitle-img {
  width: 85%;
  max-width: 350px;
  height: auto;
}

.mobile-section-3 {
  width: 100%;
  text-align: center;
  margin-bottom: -40px;
  z-index: 1;
}

.mobile-game-banner {
  width: 95%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: contain;
}

.mobile-section-4 {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.mobile-character-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
}

/* Mobile Link Buttons - Responsive Grid */
.link-buttons-container-mobile {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 80%;
  max-width: 320px;
  z-index: 10;
}

.link-button-row-mobile {
  display: contents;
}

.link-button-mobile {
  background: linear-gradient(135deg, #3a3a3a 0%, #171717 100%);
  border-radius: 12px;
  padding: 3px;
  border: 1px solid #ffe10080;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80px;
}

.link-header-mobile {
  background: linear-gradient(135deg, #525252 0%, #434343 100%);
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* border: 1px solid #20ff53; */
  width: 95%;
  margin: auto;
}

.link-header-mobile .link-text {
  color: #ffef77;
  font-weight: bold;
  font-size: 14px;
}

.signal-strength-mobile {
  display: flex;
  align-items: center;
  color: #ffef77;
  font-size: 11px;
  gap: 2px;
}

.signal-strength-mobile img {
  width: 12px;
  height: auto;
}

.truycap {
  width: 90%;
  height: auto;
  margin-top: 5px;
}

/* Mobile Section 6 - Social Buttons */
.mobile-section-6 {
  width: 100%;
  padding: 0 20px;
  margin-bottom: 20px;
}

.mobile-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}

.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);
}

/* Mobile Section 7 - Footer */
.mobile-section-7 {
  flex-shrink: 0;
  margin-top: auto;
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* wrapper để chứa ảnh footer và overlay */
.footer-wrap {
  position: relative;
  width: 100%;
  max-width: 768px; /* mobile max width */
  margin: 0 auto;
}

.footer-bg {
  width: 100%;
  height: auto;
  display: block;
}

/* overlay nằm đè lên ảnh footer */
.download-buttons-overlay {
  position: absolute;
  left: 32%;
  transform: translateX(-50%);
  bottom: 0%;
  display: flex;
  gap: 0px;
  justify-content: center;
  align-items: center;
  width: 47%;
  max-width: 420px;
  pointer-events: auto;
}

/* ============================= */
/* RESPONSIVE MEDIA QUERIES */
/* ============================= */

/* iPhone 12 Pro (390x844) */
@media (max-width: 390px) {
  .mobile-container {
    padding: 0px 32px;
  }

  .mobile-title-img {
    width: 65%;
  }

  .mobile-subtitle-img {
    width: 80%;
  }

  .mobile-game-banner {
    width: 75%;
  }

  .link-buttons-container-mobile {
    width: 85%;
    gap: 8px;
  }

  .link-button-mobile {
    min-height: 75px;
  }

  .link-header-mobile .link-text {
    font-size: 13px;
  }

  .signal-strength-mobile {
    font-size: 14px;
  }

  .mobile-social-grid {
    gap: 10px;
  }

  .ios-button,
  .android-button {
    width: 100px;
    height: fit-content;
  }
}

/* iPhone 14 Pro Max (430x932) and larger phones */
@media (min-width: 430px) and (max-width: 768px) {
  .mobile-container {
    padding: 25px 20px;
  }

  .mobile-title-img {
    width: 60%;
    max-width: 300px;
  }

  .mobile-subtitle-img {
    width: 75%;
    max-width: 380px;
  }

  .mobile-game-banner {
    width: 70%;
    max-width: 350px;
  }

  .mobile-section-3 {
    margin-bottom: -50px;
  }

  .link-buttons-container-mobile {
    width: 75%;
    max-width: 340px;
    gap: 12px;
  }

  .link-button-mobile {
    min-height: 85px;
  }

  .link-header-mobile .link-text {
    font-size: 15px;
  }

  .mobile-social-grid {
    max-width: 360px;
    gap: 15px;
  }

  .ios-button,
  .android-button {
    width: 130px;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .mobile-container {
    padding: 25px 20px;
  }
  .mobile-title-img {
    width: 60%;
  }

  .mobile-subtitle-img {
    width: 75%;
  }

  .link-buttons-container-mobile {
    width: 90%;
  }

  .link-button-mobile {
    min-height: 70px;
  }

  .link-header-mobile .link-text {
    font-size: 12px;
  }
}

/* Landscape orientation */
@media (max-height: 600px) and (orientation: landscape) {
  .mobile-container {
    padding: 10px 15px;
  }

  .mobile-section-1 {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .mobile-title-img {
    width: 40%;
  }

  .mobile-subtitle-img {
    width: 50%;
  }

  .mobile-game-banner {
    width: 50%;
  }

  .mobile-character-img {
    width: 100%;
  }

  .mobile-section-3 {
    margin-bottom: -20px;
  }
}

/* ============================= */
/* ANIMATIONS */
/* ============================= */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Touch interaction feedback */
@media (hover: none) and (pointer: coarse) {
  .mobile-link-button:active,
  .mobile-social-btn:active,
  .mobile-download-btn:active {
    opacity: 0.8;
  }
}

@media (max-width: 430px) {
  .download-buttons-overlay {
    bottom: 0%;
    width: 78%;
    gap: 0px;
  }

  .ios-button,
  .android-button {
    width: 112px;
  }
}

@media (max-width: 360px) {
  .download-buttons-overlay {
    bottom: 2%;
    width: 85%;
    gap: 10px;
  }

  .ios-button,
  .android-button {
    width: 95px;
  }
}

/* lớn hơn (tablet nhỏ) */
@media (min-width: 431px) and (max-width: 768px) {
  .download-buttons-overlay {
    bottom: 22%;
    width: 60%;
    max-width: 480px;
    gap: 20px;
  }

  .ios-button,
  .android-button {
    width: 150px;
  }
}

.signal-container-pc {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  margin-top: 8px;
}

.signal-container {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  padding: 0 4px 4px;
}

.signal-bar {
  width: 3px;
  background: linear-gradient(to top, #ffe41a, #ffef77);
  border-radius: 1px;
  animation: pulse 1.5s infinite;
  transform-origin: bottom;
}

/* Different heights for each bar */
.signal-bar:nth-child(1) {
  height: 25%;
  animation-delay: 0s;
}

.signal-bar:nth-child(2) {
  height: 50%;
  animation-delay: 0.2s;
}

.signal-bar:nth-child(3) {
  height: 75%;
  animation-delay: 0.4s;
}

.signal-bar:nth-child(4) {
  height: 100%;
  animation-delay: 0.6s;
}

/* Pulse animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.8);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Alternative random animation style */
.signal-container.random .signal-bar {
  animation: randomPulse 2s infinite;
}

.signal-container.random .signal-bar:nth-child(1) {
  animation-duration: 1.8s;
  animation-delay: 0.3s;
}

.signal-container.random .signal-bar:nth-child(2) {
  animation-duration: 2.2s;
  animation-delay: 0.1s;
}

.signal-container.random .signal-bar:nth-child(3) {
  animation-duration: 1.6s;
  animation-delay: 0.5s;
}

.signal-container.random .signal-bar:nth-child(4) {
  animation-duration: 2s;
  animation-delay: 0s;
}

@keyframes randomPulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(0.7);
  }
  25% {
    opacity: 0.7;
    transform: scaleY(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
  75% {
    opacity: 0.6;
    transform: scaleY(0.9);
  }
}

/* Wave animation style */
.signal-container.wave .signal-bar {
  animation: wave 1.2s infinite ease-in-out;
}

.signal-container.wave .signal-bar:nth-child(1) {
  animation-delay: 0s;
}

.signal-container.wave .signal-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.signal-container.wave .signal-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.signal-container.wave .signal-bar:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes wave {
  0%,
  40%,
  100% {
    transform: scaleY(0.4);
    opacity: 0.5;
  }
  20% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.latency-text {
  margin-top: 11px;
}
