/*
 * MT4 / MT5 alignment layer.
 * Loaded last so the legacy page CSS cannot override the homepage header.
 */
header {
  position: sticky;
  top: 18px;
  z-index: 50;
  background: transparent;
  pointer-events: none;
}

nav {
  position: relative;
  z-index: 2;
  width: calc(100% - 48px);
  max-width: 1360px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px 0 26px;
  display: flex;
  align-items: center;
  gap: 30px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 999px;
  background: rgba(4, 16, 34, .76);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
}

.logo {
  min-width: 0;
  display: flex;
  align-items: center;
}

.logo img.nav-logo-img {
  width: 215px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
}

.nav-links {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 34px;
  color: #c7d8ef;
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", sans-serif;
  font-size: 16px;
}

.nav-links > a,
.nav-item > a {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0;
  opacity: .85;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  opacity: 1;
}

.nav-links svg {
  width: 11px;
  height: 11px;
  opacity: .6;
}

.nav-item {
  position: static;
  display: flex;
  align-items: center;
}

.nav-dropdown {
  position: absolute;
  top: -18px;
  left: 50%;
  z-index: -1;
  width: 100vw;
  height: clamp(380px, 42vh, 430px);
  padding: 104px max(46px, calc((100vw - 1360px) / 2 + 24px)) 42px;
  border: 1px solid rgba(120, 180, 240, .16);
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(4, 16, 34, .9), rgba(4, 14, 30, .74)),
    radial-gradient(circle at 78% 26%, rgba(72, 180, 255, .22), transparent 34%),
    radial-gradient(circle at 16% 64%, rgba(30, 135, 245, .14), transparent 38%);
  box-shadow:
    0 28px 78px rgba(0, 0, 0, .36),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    inset 0 -1px 0 rgba(120, 180, 240, .2);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -10px);
  pointer-events: none;
  transition: .22s ease;
}

.nav-dropdown::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 112px;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.mega-menu {
  position: relative;
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(330px, 430px) minmax(0, 1fr);
  gap: 70px;
}

.mega-promo {
  padding-top: 10px;
  padding-left: 120px;
}

.mega-promo h3 {
  max-width: 390px;
  color: #eef6ff;
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", sans-serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.38;
  letter-spacing: 0;
}

.mega-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-dropdown a {
  min-height: 0;
  padding: 4px 0;
  border-radius: 0;
  color: rgba(219, 233, 251, .66);
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  white-space: nowrap;
  opacity: 1;
}

.nav-dropdown a:hover {
  color: #fff;
  background: transparent;
  opacity: 1;
}

.nav-dropdown .mega-actions a {
  min-height: 46px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.nav-dropdown .mega-actions .mega-primary {
  color: #fff;
  background: linear-gradient(180deg, #39a7ff, #1688f8);
  box-shadow: 0 12px 34px rgba(22, 136, 248, .38);
}

.nav-dropdown .mega-actions .mega-ghost {
  border: 1px solid rgba(57, 167, 255, .72);
  color: #eaf6ff;
  background: rgba(22, 136, 248, .08);
}

.nav-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 50px 86px;
  align-content: start;
}

.nav-dropdown.market .nav-menu-grid {
  grid-template-columns: 150px 120px 120px;
  gap: 50px 34px;
  justify-content: start;
}

.nav-menu-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.nav-dropdown.market .market-extra {
  padding-top: 48px;
}

.nav-menu-col h4 {
  margin: 0 0 10px;
  color: #f4f8ff;
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: 0;
  text-transform: none;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-right .btn {
  min-height: 0;
  padding: 10px 21px;
  border: 0;
  border-radius: 999px;
  font-family: "General Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.nav-right .btn-ghost {
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  background: rgba(255, 255, 255, .055);
}

.nav-right .btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #39a7ff, #1688f8);
  box-shadow: 0 8px 30px rgba(22, 136, 248, .42);
}

.nav-right .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.nav-right .btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .6) 50%, transparent 62%);
  transform: translateX(-160%);
}

.nav-right .btn-ghost::after {
  animation: mt-nav-shine 3s linear infinite;
}

.nav-right .btn-primary::after {
  animation: mt-nav-shine 3s linear infinite .2s;
}

@keyframes mt-nav-shine {
  0% { transform: translateX(-160%); }
  20%, 100% { transform: translateX(160%); }
}

.lang-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  color: #c7d8ef;
  background: rgba(255, 255, 255, .06);
}

.lang-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  color: #c7d8ef;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 -7px 0 currentColor;
}

.mobile-menu-panel {
  display: none;
}

/* Same visible banner geometry as the canonical inner pages. */
.blank-hero {
  min-height: 667px;
  margin-top: -86px;
  background-position: center top;
  background-size: cover;
}

@media (max-width: 900px) {
  header {
    top: 12px;
  }

  nav {
    height: 68px;
    margin: 0 14px;
    padding: 0 18px;
    gap: 18px;
  }

  .logo img.nav-logo-img {
    width: 180px;
    max-height: 48px;
  }

  .nav-right .lang-btn {
    display: none;
  }

  .nav-right .btn {
    padding: 9px 15px;
    display: inline-flex;
    font-size: 13px;
    line-height: 1;
  }

  .blank-hero {
    min-height: 612px;
    margin-top: -76px;
  }
}

/* 七个中文一级栏目在 1280px 以下排不进胶囊，会逐字折行。
   这条必须放在本文件里：页面内联 <style> 的同名规则会被本文件的
   基础 .nav-links{display:flex} 覆盖（同优先级、后加载者胜）。 */
@media (max-width: 1280px) {

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  nav.menu-open .menu-toggle span {
    position: relative;
    height: 0;
    box-shadow: none;
  }

  nav.menu-open .menu-toggle span::before,
  nav.menu-open .menu-toggle span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 21px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
  }

  nav.menu-open .menu-toggle span::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  nav.menu-open .menu-toggle span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .mobile-menu-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 10px;
    left: 10px;
    max-height: calc(100vh - 106px);
    padding: 26px 22px 28px;
    display: block;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 24px;
    background: rgba(4, 12, 30, .96);
    box-shadow: 0 26px 70px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .06);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: .22s ease;
  }

  nav.menu-open .mobile-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-menu-main {
    display: grid;
    gap: 0;
  }

  .mobile-menu-main > a,
  .mobile-menu-main summary {
    min-height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #dbe6f7;
    font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", sans-serif;
    font-size: 18px;
    letter-spacing: 0;
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu-main summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu-main summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: .65;
    transform: rotate(45deg);
    transition: .2s;
  }

  .mobile-submenu[open] summary::after {
    transform: rotate(225deg);
  }

  .mobile-submenu-links {
    padding: 12px 0 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .mobile-submenu-links a {
    min-height: 0;
    padding: 7px 0;
    display: block;
    border: 0;
    color: #a8c2e4;
    font-size: 14.5px;
    line-height: 1.35;
  }

  .mobile-menu-meta {
    margin-top: 22px;
    padding-top: 22px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }

  .mobile-menu-col h4 {
    margin: 0 0 14px;
    color: #697184;
    font-family: "General Sans", -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    letter-spacing: .32em;
    text-transform: uppercase;
  }

  .mobile-menu-col button {
    width: 100%;
    padding: 4px 0;
    display: block;
    border: 0;
    color: #a8b1c2;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 15px;
    line-height: 1.7;
    cursor: pointer;
  }

  .mobile-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .mobile-menu-actions {
    display: none;
  }
}

@media (max-width: 560px) {
  header {
    top: 8px;
  }

  nav {
    width: calc(100% - 20px);
    height: 58px;
    min-height: 58px;
    margin: 0 10px;
    padding: 0 10px 0 14px;
    gap: 8px;
    border-radius: 26px;
  }

  .logo img.nav-logo-img {
    width: 160px;
    max-height: 38px;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .menu-toggle span {
    position: relative;
    width: 19px;
  }

  nav.menu-open .menu-toggle span::before,
  nav.menu-open .menu-toggle span::after {
    width: 19px;
  }

  .mobile-menu-panel {
    right: 0;
    left: 0;
    padding: 22px 22px 24px;
    border-radius: 22px;
  }

  .mobile-menu-main > a,
  .mobile-menu-main summary {
    min-height: 48px;
    font-size: 17px;
  }

  .mobile-menu-meta {
    gap: 20px;
  }

  .blank-hero {
    min-height: 510px;
    margin-top: -76px;
  }
}

@media (max-width: 390px) {
  .nav-right {
    gap: 6px;
  }

  .nav-right .btn {
    padding: 8px 9px;
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-right .btn::after {
    animation: none;
  }
}
