*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  color: #fff;
  background: #0a0e27;
}

/* 背景与 ProjectPage 一致（无语言条、无底部社区时的居中布局） */
.home-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a0e27;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .home-page {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
    background-image: url("assets/home_mobile.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0a0e27;
    position: relative;
  }

  .home-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(10, 14, 39, 0.5) 0%,
      rgba(10, 14, 39, 0.4) 50%,
      rgba(10, 14, 39, 0.6) 100%
    );
    z-index: 0;
    pointer-events: none;
  }

  .home-page > * {
    position: relative;
    z-index: 1;
  }
}

@media (min-width: 769px) {
  .home-page {
    min-height: 100vh;
    min-height: 100dvh;
    background-image: url("assets/home_pc.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #0a0e27;
  }

  @media (min-width: 3440px) {
    .home-page {
      background-size: 100% auto;
      background-position: center center;
    }
  }

  .home-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(10, 14, 39, 0.6) 0%,
      rgba(10, 14, 39, 0.5) 50%,
      rgba(10, 14, 39, 0.7) 100%
    );
    z-index: 0;
    pointer-events: none;
  }

  .home-page > * {
    position: relative;
    z-index: 1;
  }
}

.home-content {
  flex: 1;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vh, 2.5rem) clamp(1rem, 4vw, 1.5rem);
}

@media (min-width: 769px) {
  .home-content {
    min-height: 100dvh;
  }
}

.main-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.actions-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Logo + 商店按钮作为一整块在视口内水平、垂直居中 */
.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 6vw, 66px);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
}

.home-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-inline: auto;
}

.home-logo {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (min-width: 769px) {
  .home-logo {
    max-width: 400px;
    max-height: 200px;
  }
}

@media (max-width: 768px) {
  .home-logo-container {
    padding: 0 20px;
  }

  .home-logo {
    max-width: 280px;
    max-height: 140px;
  }
}

@media (max-width: 480px) {
  .home-logo-container {
    padding: 0 16px;
  }

  .home-logo {
    max-width: 240px;
    max-height: 120px;
  }
}

@media (max-width: 360px) {
  .home-logo-container {
    padding: 0 12px;
  }

  .home-logo {
    max-width: 200px;
    max-height: 100px;
  }
}

.download-section {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-inline: auto;
}

@media (min-width: 769px) {
  .download-section {
    gap: 18px;
  }
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
  height: 60px;
}

.download-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.download-btn:active {
  transform: translateY(-1px);
}

.download-btn-image-google,
.download-btn-image-ios {
  display: block;
  height: 60px;
  width: auto;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 769px) {
  .download-btn {
    height: 80px;
  }

  .download-btn-image-google,
  .download-btn-image-ios {
    height: 80px;
  }
}

@media (max-width: 768px) {
  .download-btn {
    height: 70px;
  }

  .download-btn-image-google,
  .download-btn-image-ios {
    height: 70px;
  }
}

@media (max-width: 480px) {
  .download-btn {
    height: 60px;
  }

  .download-btn-image-google,
  .download-btn-image-ios {
    height: 60px;
  }
}

@media (max-width: 360px) {
  .download-btn {
    height: 55px;
  }

  .download-btn-image-google,
  .download-btn-image-ios {
    height: 55px;
  }
}

/* 商店按钮下方的英 / 越切换（仅两种语言）— 胶囊条 + 金色选中态 */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  user-select: none;
  margin-top: clamp(0.65rem, 2.5vw, 1.1rem);
  padding: 6px 8px;
  background: rgba(5, 10, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-toggle__btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: clamp(0.95rem, 3.2vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.55rem 1.2rem;
  min-width: 7.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.lang-toggle__btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.lang-toggle__btn:active {
  transform: scale(0.98);
}

.lang-toggle__btn:focus-visible {
  outline: 2px solid #ffd54a;
  outline-offset: 3px;
}

.lang-toggle__btn.is-active {
  color: #0f1324;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 55%, #ffc400 100%);
  border-color: rgba(255, 230, 140, 0.95);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(255, 200, 40, 0.45);
  text-decoration: none;
}

.lang-toggle__sep {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  font-size: 1.1em;
  padding: 0 0.15rem;
  pointer-events: none;
}

@media (max-width: 380px) {
  .lang-toggle {
    flex-direction: column;
    gap: 8px;
    border-radius: 16px;
    padding: 10px;
  }

  .lang-toggle__sep {
    display: none;
  }

  .lang-toggle__btn {
    width: 100%;
    min-width: 0;
    padding: 0.55rem 1rem;
  }
}
