:root {
  --chrome-safe-width: 1268px;
  --chrome-header-pad-x: clamp(28px, 4vw, 72px);
  --chrome-blue: #54d8ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

.global-chrome-page .page-shell {
  padding-top: 76px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  display: flex;
  width: 100%;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 9, 19, 0.92);
  padding: 0 var(--chrome-header-pad-x);
  color: #fff;
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  backdrop-filter: blur(18px);
}

.site-header.is-overlay:not(.is-scrolled),
.site-header.is-scrolled,
.site-header.is-overlay.is-scrolled {
  background: rgba(4, 9, 19, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 50px;
  height: 50px;
  padding: 0;
  object-fit: contain;
}

.header-nav-group {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2vw, 28px);
  margin-left: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.main-nav a {
  position: relative;
  padding: 30px 0 28px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 2px;
  background: var(--chrome-blue);
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fff;
}

.main-nav a.is-active::after,
.main-nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-header-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.site-header-demo,
.site-header-login {
  display: inline-flex;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.site-header-demo {
  border: 1px solid rgba(64, 176, 255, 0.62);
  background: linear-gradient(180deg, rgba(21, 135, 255, 0.92), rgba(12, 89, 190, 0.88));
  box-shadow: 0 10px 24px rgba(0, 112, 230, 0.22);
  color: #ffffff;
}

.site-header-login {
  gap: 8px;
  border: 1px solid rgba(40, 94, 155, 0.82);
  background: rgba(6, 23, 51, 0.74);
  box-shadow: 0 0 20px rgba(0, 95, 190, 0.16);
  color: #74c6ff;
}

.site-header-login svg {
  width: 20px;
  height: 20px;
  color: #d5eaff;
}

.site-header-demo:hover,
.site-header-login:hover {
  transform: translateY(-1px);
}

.site-header-demo:hover {
  border-color: rgba(128, 220, 255, 0.86);
  background: linear-gradient(180deg, rgba(37, 156, 255, 0.96), rgba(16, 101, 208, 0.92));
}

.site-header-login:hover {
  border-color: rgba(81, 176, 255, 0.9);
  background: rgba(8, 34, 74, 0.86);
  color: #a9ddff;
}

.site-header-user {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(64, 176, 255, 0.35);
  border-radius: 999px;
  background: rgba(6, 23, 51, 0.6);
  padding: 0 16px 0 4px;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.site-header-user:hover {
  border-color: rgba(128, 220, 255, 0.7);
  background: rgba(8, 34, 74, 0.8);
  transform: translateY(-1px);
}

.site-header-user:active {
  transform: translateY(0);
}

.site-header-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f8fff 0%, #0d5fbf 100%);
  box-shadow: 0 0 0 2px rgba(31, 143, 255, 0.3);
}

.site-header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.site-header-avatar-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.site-header-user-name {
  max-width: 100px;
  overflow: hidden;
  color: #d5eaff;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.site-footer {
  background: #030911;
  color: #aebfd1;
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

.site-footer-inner {
  width: min(var(--chrome-safe-width), calc(100% - 72px));
  margin: 0 auto;
  padding: 24px 0 20px;
}

.site-footer-brand-row,
.site-footer-legal-row,
.site-footer-brand,
.site-footer-records,
.site-footer-police {
  display: flex;
  align-items: center;
}

.site-footer-brand-row,
.site-footer-legal-row {
  justify-content: space-between;
  gap: 32px;
}

.site-footer-brand {
  gap: 10px;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.site-footer-brand img {
  width: 36px;
  height: 36px;
  padding: 0;
  object-fit: contain;
}

.site-footer-slogan,
.site-footer-legal-row p {
  margin: 0;
}

.site-footer-slogan {
  color: #f3f7fb;
  font-size: 15px;
  font-weight: 800;
}

.site-footer-divider {
  height: 1px;
  margin: 18px 0 14px;
  background: rgba(166, 199, 232, 0.24);
}

.site-footer-legal-row {
  color: #9fb4ca;
  font-size: 13px;
  line-height: 1.55;
}

.site-footer-records {
  gap: 12px;
  justify-content: flex-end;
  color: #a9c5df;
  white-space: nowrap;
}

.site-footer-records a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer-records a:hover {
  color: #fff;
}

.site-footer-police {
  gap: 8px;
}

.site-footer-police img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

@media (max-width: 980px) {
  html,
  body {
    overflow-x: hidden;
  }

  .site-header {
    min-height: 68px;
    padding: 0 20px;
  }

  .global-chrome-page .page-shell {
    padding-top: 68px;
  }

  .menu-toggle {
    display: block;
  }

  .header-nav-group {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    z-index: 120;
    display: grid;
    width: auto;
    margin-left: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    max-height: calc(100svh - 68px);
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: #050d19;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
    padding: 8px 20px 22px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
  }

  body.menu-open .header-nav-group {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav {
    display: grid;
    width: 100%;
    gap: 0;
    margin: 0;
    font-size: 15px;
  }

  .main-nav a {
    display: flex;
    min-height: 52px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    text-align: left;
  }

  .main-nav a::after {
    display: none;
  }

  .site-header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .site-header-demo,
  .site-header-login {
    width: 100%;
  }

  .site-header-user {
    display: inline-flex;
    height: 42px;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(64, 176, 255, 0.35);
    border-radius: 999px;
    background: rgba(6, 23, 51, 0.6);
    padding: 0 16px 0 4px;
    cursor: pointer;
    user-select: none;
    transition:
      border-color 0.2s ease,
      background 0.2s ease,
      transform 0.2s ease;
  }

  .site-header-user-name {
    max-width: 100px;
    overflow: hidden;
    color: #d5eaff;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-footer-inner {
    width: min(100% - 40px, var(--chrome-safe-width));
    padding: 24px 0 22px;
  }

  .site-footer-brand-row,
  .site-footer-legal-row {
    display: grid;
    justify-content: stretch;
    gap: 12px;
  }

  .site-footer-slogan {
    font-size: 14px;
  }

  .site-footer-divider {
    margin: 16px 0 12px;
  }

  .site-footer-records {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 12px;
    white-space: normal;
  }
}
