#header,
#header * {
  box-sizing: border-box;
}

#header {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: 100px;
  color: #fff;
  font-family:
    "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei",
    system-ui, sans-serif;
}

#header-wrap {
  height: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  transition: background 180ms ease, box-shadow 180ms ease;
}

#header.header-scrolled #header-wrap {
  background: rgba(2, 9, 21, 0.96);
  box-shadow: 0 14px 38px rgba(0, 5, 18, 0.3);
  backdrop-filter: blur(18px);
}

#header a {
  color: inherit;
  text-decoration: none;
}

#header ul,
#header li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#header .container {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0 auto;
  padding: 0 0 0 30px;
}

#header .header-row {
  display: flex;
  height: 100%;
  align-items: center;
}

#header #logo {
  display: flex;
  margin-right: auto;
  padding-right: 30px;
  align-items: center;
  flex: 0 0 auto;
}

#header #logo .jy-logo-group {
  display: flex;
  align-items: center;
  gap: 22px;
}

#header #logo .jy-logo-link {
  display: flex;
  width: auto;
  align-items: center;
}

#header #logo img {
  display: block;
  width: 240px !important;
  height: auto !important;
  max-width: none;
  padding: 0 !important;
}

#header #logo .logo-dark {
  display: none;
}

#header #logo .jy-ai-service-entry {
  position: relative;
  display: inline-flex;
  width: auto;
  margin-left: 8px;
  padding: 9px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: #0072ff;
  box-shadow: 0 8px 22px -10px rgba(95, 178, 255, 0.8);
  color: #fff !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

#header #logo .jy-ai-service-entry:hover {
  background: #005ed6;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(95, 178, 255, 0.9);
}

#header #logo .jy-ai-service-entry-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

#header #logo .jy-ai-service-entry-text {
  white-space: nowrap;
}

#header #logo .jy-ai-service-entry-badge {
  position: absolute;
  top: -7px;
  right: -10px;
  padding: 3px 7px 2px;
  border-radius: 999px;
  background: #7df9c4;
  color: #06112a;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  transform: rotate(6deg);
}

#header .primary-menu {
  display: flex;
  margin-left: auto;
  align-items: center;
}

#header .menu-container {
  display: flex;
  margin-right: 8px;
  padding-right: 8px;
  align-items: center;
  gap: 0;
}

#header .menu-item {
  position: relative;
}

#header .menu-container > .menu-item:not(:first-child) {
  margin-left: 2px;
}

#header .menu-link {
  position: relative;
  display: flex;
  height: 100px;
  padding: 0 15px;
  align-items: center;
  color: #f8f9fa;
  font-family: "Inter", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
  transition: color 180ms ease;
}

#header .menu-item:hover > .menu-link,
#header .menu-link:focus-visible {
  color: #0072ff;
}

#header .sub-menu-container {
  position: absolute;
  top: calc(100% - 8px);
  left: 0;
  z-index: 1001;
  width: 240px;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid #0072ff;
  background: #212529;
  box-shadow: 0 13px 42px 11px rgba(0, 0, 0, 0.05);
  transform: translateY(15px);
  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}

#header .menu-item:hover > .sub-menu-container,
#header .menu-item:focus-within > .sub-menu-container {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

#header .sub-menu-container .menu-link {
  height: auto;
  min-height: 42px;
  padding: 10px 6px;
  justify-content: center;
  color: #f8f9fa;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
  white-space: normal;
}

#header .sub-menu-container .menu-link:hover,
#header .sub-menu-container .menu-link:focus-visible {
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
}

/* Shared service mega menu for the standalone VR header. */
#header .service-menu-arrow {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  vertical-align: middle;
  transform: rotate(45deg);
  transform-origin: 65% 65%;
  transition: transform 0.25s ease;
}

@media (min-width: 992px) {
  #header .service-mega-menu {
    position: static;
  }

  #header:has(.service-mega-menu:hover) #header-wrap,
  #header:has(.service-mega-menu:focus-within) #header-wrap,
  #header.service-menu-active #header-wrap {
    border-bottom-color: #eceef2;
    background: #fff;
    box-shadow: none;
  }

  #header:has(.service-mega-menu:hover) .menu-container > .menu-item > .menu-link,
  #header:has(.service-mega-menu:focus-within) .menu-container > .menu-item > .menu-link,
  #header.service-menu-active .menu-container > .menu-item > .menu-link {
    color: #1c2027;
  }

  #header:has(.service-mega-menu:hover) .service-mega-menu > .menu-link,
  #header:has(.service-mega-menu:focus-within) .service-mega-menu > .menu-link,
  #header.service-menu-active .service-mega-menu > .menu-link {
    color: #246bfe;
  }

  #header:has(.service-mega-menu:hover) #logo .logo-default,
  #header:has(.service-mega-menu:focus-within) #logo .logo-default,
  #header.service-menu-active #logo .logo-default {
    display: none;
  }

  #header:has(.service-mega-menu:hover) #logo .logo-dark,
  #header:has(.service-mega-menu:focus-within) #logo .logo-dark,
  #header.service-menu-active #logo .logo-dark {
    display: block;
  }

  #header .service-mega-menu:hover .service-menu-arrow,
  #header .service-mega-menu:focus-within .service-menu-arrow,
  #header .service-mega-menu.service-menu-open .service-menu-arrow {
    transform: rotate(225deg);
  }

  #header .service-mega-panel {
    top: 100px;
    right: 0;
    left: 0;
    width: 100vw;
    padding: 0;
    border: 0;
    border-top: 1px solid #eceef2;
    background: #fff;
    box-shadow: 0 18px 36px rgba(20, 27, 38, 0.08);
    color: #20252d;
    transform: translateY(10px);
  }

  #header .service-mega-menu:hover > .service-mega-panel,
  #header .service-mega-menu:focus-within > .service-mega-panel,
  #header .service-mega-menu.service-menu-open > .service-mega-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  #header .service-mega-menu.service-menu-grace::after {
    content: "";
    position: fixed;
    top: 84px;
    right: 0;
    left: 0;
    z-index: 1000;
    height: 150px;
    pointer-events: auto;
  }

  #header .service-mega-menu.service-menu-grace:not(.service-menu-open) > .service-mega-panel {
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: none;
  }

  #header .service-mega-inner {
    display: grid;
    grid-template-columns: minmax(210px, 0.75fr) minmax(0, 3fr);
    gap: 48px;
    width: min(1380px, calc(100vw - 64px));
    margin: 0 auto;
    padding: 38px 0 40px;
  }

  #header .service-mega-intro {
    padding-right: 38px;
    border-right: 1px solid #eceef2;
  }

  #header .service-mega-intro h2 {
    margin: 0;
    color: #15191f;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
  }

  #header .service-mega-intro p {
    margin: 18px 0 28px;
    color: #737b87;
    font-size: 14px;
    line-height: 1.85;
  }

  #header .service-mega-intro > a {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #246bfe;
    font-size: 14px;
    font-weight: 600;
    transition: gap 0.2s ease, color 0.2s ease;
  }

  #header .service-mega-intro > a:hover {
    gap: 15px;
    color: #0c4fd6;
  }

  #header .service-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(36px, 4vw, 76px);
  }

  #header .service-mega-column {
    min-width: 0;
  }

  #header .service-mega-column + .service-mega-column {
    padding-left: clamp(28px, 3vw, 52px);
    border-left: 1px solid #eceef2;
  }

  #header .service-mega-title {
    margin: 0 0 22px;
    color: #9ba2ad;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
  }

  #header .service-mega-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  #header .service-mega-links a {
    display: block;
    color: #2f353d;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  #header .service-mega-links a:hover {
    color: #246bfe;
    transform: translateX(3px);
  }

  #header .service-mega-divider {
    height: 1px;
    margin: 20px 0 16px;
    background: #e5e8ed;
  }

  #header .service-mega-featured {
    display: block;
    padding: 12px 14px;
    border: 1px solid #dce7ff;
    border-radius: 6px;
    background: #f5f8ff;
    color: #135fd7;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  }

  #header .service-mega-featured:hover {
    border-color: #b9cdfa;
    background: #edf3ff;
    color: #0c4fd6;
    transform: translateY(-2px);
  }

  #header .service-mega-featured-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.4;
  }

  #header .service-mega-featured-name em {
    display: inline-flex;
    min-height: 18px;
    padding: 2px 6px;
    align-items: center;
    border-radius: 3px;
    background: #ff6c2f;
    color: #fff;
    font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
  }

  #header .service-mega-featured small {
    display: block;
    margin-top: 4px;
    color: #7b8493;
    font-size: 12px;
    line-height: 1.45;
  }
}

#header .primary-menu-trigger {
  display: none;
}

#header .cnvs-hamburger {
  position: relative;
  width: 26px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

#header .cnvs-hamburger-box,
#header .cnvs-hamburger-inner,
#header .cnvs-hamburger-inner::before,
#header .cnvs-hamburger-inner::after {
  display: block;
  width: 24px;
}

#header .cnvs-hamburger-box {
  position: relative;
  height: 18px;
}

#header .cnvs-hamburger-inner,
#header .cnvs-hamburger-inner::before,
#header .cnvs-hamburger-inner::after {
  position: absolute;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 180ms ease, top 180ms ease, opacity 180ms ease;
}

#header .cnvs-hamburger-inner {
  top: 8px;
}

#header .cnvs-hamburger-inner::before,
#header .cnvs-hamburger-inner::after {
  content: "";
}

#header .cnvs-hamburger-inner::before {
  top: -7px;
}

#header .cnvs-hamburger-inner::after {
  top: 7px;
}

body.primary-menu-open #header .cnvs-hamburger-inner {
  transform: rotate(45deg);
}

body.primary-menu-open #header .cnvs-hamburger-inner::before {
  top: 0;
  opacity: 0;
}

body.primary-menu-open #header .cnvs-hamburger-inner::after {
  top: 0;
  transform: rotate(-90deg);
}

@media (max-width: 1180px) {
  #header .container {
    width: 100%;
    padding-right: 0;
    padding-left: 20px;
  }

  #header #logo img {
    width: 200px !important;
  }

  #header .menu-link {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 14px;
  }
}

@media (max-width: 991px) {
  #header {
    height: 70px;
  }

  #header-wrap {
    background: rgba(2, 9, 21, 0.96);
  }

  #header .container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
  }

  #header #logo img {
    width: 160px !important;
  }

  #header #logo {
    padding-right: 0;
  }

  #header #logo .jy-logo-group {
    gap: 10px;
  }

  #header #logo .jy-ai-service-entry {
    margin-left: 2px;
    padding: 7px 10px;
    gap: 5px;
    font-size: 11px;
  }

  #header #logo .jy-ai-service-entry-badge {
    display: none;
  }

  #header .primary-menu-trigger {
    display: flex;
    margin-left: auto;
    padding-left: 18px;
    align-items: center;
  }

  #header .primary-menu {
    position: absolute;
    top: 70px;
    right: -15px;
    left: -15px;
    display: none;
    margin: 0;
    border-top: 1px solid rgba(118, 148, 198, 0.14);
    background: rgba(2, 9, 21, 0.98);
    box-shadow: 0 18px 40px rgba(0, 5, 18, 0.38);
  }

  body.primary-menu-open #header .primary-menu {
    display: block;
  }

  #header .menu-container {
    display: block;
    margin-right: 0;
    max-height: calc(100vh - 70px);
    padding: 10px 20px 22px;
    overflow-y: auto;
  }

  #header .menu-link {
    height: auto;
    min-height: 46px;
    padding: 10px 4px;
    font-size: 15px;
  }

  #header .sub-menu-container,
  #header .menu-item:hover > .sub-menu-container,
  #header .menu-item:focus-within > .sub-menu-container {
    position: static;
    display: none;
    width: 100% !important;
    padding: 4px 0 10px 14px;
    visibility: visible;
    opacity: 1;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  #header .menu-item.submenu-open > .sub-menu-container {
    display: block;
  }

  #header .sub-menu-container .menu-link {
    min-height: 40px;
    padding: 8px 12px;
    justify-content: flex-start;
    text-align: left;
  }

  #header .service-mega-panel {
    padding-left: 18px;
    color: #f8f9fa;
  }

  #header .service-mega-intro {
    padding: 12px 0 16px;
  }

  #header .service-mega-intro h2 {
    margin: 0;
    font-size: 16px;
  }

  #header .service-mega-intro p,
  #header .service-mega-intro > a {
    display: none;
  }

  #header .service-mega-column {
    padding: 16px 0 8px;
  }

  #header .service-mega-column + .service-mega-column {
    border-top: 1px solid rgba(115, 129, 153, 0.22);
  }

  #header .service-mega-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
  }

  #header .service-mega-links {
    display: flex;
    flex-direction: column;
  }

  #header .service-mega-links a {
    padding: 8px 12px;
    color: #d7deeb;
    font-size: 14px;
    line-height: 1.45;
  }

  #header .service-mega-divider {
    height: 1px;
    margin: 10px 12px 13px;
    background: rgba(115, 129, 153, 0.22);
  }

  #header .service-mega-featured {
    display: block;
    margin-right: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(100, 148, 229, 0.3);
    border-radius: 6px;
    background: rgba(38, 83, 159, 0.18);
    color: #a9c7ff;
  }

  #header .service-mega-featured-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
  }

  #header .service-mega-featured-name em {
    padding: 2px 5px;
    border-radius: 3px;
    background: #ff7540;
    color: #fff;
    font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    font-size: 8px;
    font-style: normal;
    letter-spacing: 0.08em;
  }

  #header .service-mega-featured small {
    display: block;
    margin-top: 4px;
    color: #8798b3;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  #header #logo img {
    width: 138px !important;
  }

  #header #logo .jy-ai-service-entry-text {
    display: none;
  }

  #header #logo .jy-ai-service-entry {
    width: 30px;
    height: 30px;
    padding: 0;
  }
}
