:root {
  --glass-header-bg: transparent;
  --glass-header-border: transparent;
  --glass-header-shadow: none;
  --glass-header-color: #101828;

  --glass-footer-bg: transparent;
  --glass-footer-border: transparent;
  --glass-footer-shadow: none;
  --glass-footer-color: #667085;

  --glass-dark-header-bg: transparent;
  --glass-dark-header-border: transparent;
  --glass-dark-header-shadow: none;
  --glass-dark-header-color: #e5e7eb;

  --glass-dark-footer-bg: transparent;
  --glass-dark-footer-border: transparent;
  --glass-dark-footer-shadow: none;
  --glass-dark-footer-color: #9ca3af;
}

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

body {
  font-family: SF Pro, Helvetica Neue, Segoe UI, Tahoma, Arial, Ubuntu,
    PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
}

html.lock-scroll,
body.lock-scroll {
  overflow-y: hidden;
  overscroll-behavior-y: none;
}

html.allow-scroll,
body.allow-scroll {
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body > * {
  position: relative;
  z-index: 1;
}

.topbar-nav {
  z-index: 1000;
  background: var(--glass-header-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  font-weight: 600;
  font-size: 18px;
  color: var(--glass-header-color);
  line-height: 24px;
  text-align: center;
  padding: 0 28px;
  width: calc(100% - 10px);
  margin: 6px auto 0;
  border-radius: 30px;
  border: 1px solid var(--glass-header-border);
  box-shadow: var(--glass-header-shadow);
  overflow: visible;
}

.topbar-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  position: relative;
  color: var(--glass-header-color);
}

.nav-logo-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.nav-logo-link:hover {
  opacity: 0.92;
}

.nav-logo {
  height: 32px;
  pointer-events: unset;
  position: relative;
  top: -3px;
}

.nav-logo img {
  height: 100%;
  width: auto;
  max-width: 100%;
  display: block;
}

.nav-title {
  font-weight: 600;
  font-size: 16px;
  color: inherit;
  letter-spacing: 0.2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
  position: relative;
}

.nav-right a {
  position: relative;
  color: var(--glass-header-color);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-right a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transform: scaleX(0.35);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.nav-right a:hover {
  color: #0f7de8;
}

.nav-right a:hover::after {
  background: rgba(0, 149, 246, 0.35);
  opacity: 1;
  transform: scaleX(1);
}

.nav-right a.active,
.nav-right a[aria-current="page"] {
  color: #0095f6;
}

.nav-right a.active::after,
.nav-right a[aria-current="page"]::after {
  background: rgba(0, 149, 246, 0.4);
  opacity: 1;
  transform: scaleX(1);
}

.page-main {
  flex: 1 0 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
}

.container {
  flex: 1 0 auto;
}

.site-footer {
  padding: 14px 22px;
  text-align: center;
  font-size: 12px;
  color: var(--glass-footer-color);
  line-height: 20px;
  position: relative;
  left: auto;
  transform: none;
  bottom: auto;
  width: calc(100% - 10px);
  margin: 0 auto;
  margin-top: auto;
  background: var(--glass-footer-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 24px;
  border: 1px solid var(--glass-footer-border);
  box-shadow: var(--glass-footer-shadow);
  z-index: 900;
  overflow: visible;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

@media (max-width: 768px) {
  .topbar-nav {
    width: calc(100% - 6px);
    margin-top: 3px;
    border-radius: 22px;
    padding: 0 16px;
    height: 58px;
  }

  .nav-left {
    gap: 10px;
  }

  .nav-title {
    font-size: 15px;
  }

  .nav-right {
    gap: 14px;
  }

  .nav-right a {
    font-size: 13px;
  }

  .site-footer {
    width: calc(100% - 6px);
    border-radius: 18px;
    margin: 0 auto;
    padding: 12px 14px;
  }
}

@media (prefers-color-scheme: dark) {
  .topbar-nav {
    background: var(--glass-dark-header-bg);
    border: 1px solid var(--glass-dark-header-border);
    color: var(--glass-dark-header-color);
    box-shadow: var(--glass-dark-header-shadow);
  }

  .nav-left {
    color: var(--glass-dark-header-color);
  }

  .nav-title {
    color: var(--glass-dark-header-color);
  }

  .nav-right a {
    color: var(--glass-dark-header-color);
  }

  .nav-right a:hover {
    color: #7dd3fc;
  }

  .nav-right a:hover::after,
  .nav-right a.active::after,
  .nav-right a[aria-current="page"]::after {
    background: rgba(125, 211, 252, 0.5);
  }

  .nav-right a.active,
  .nav-right a[aria-current="page"] {
    color: #7dd3fc;
  }

  .site-footer {
    color: var(--glass-dark-footer-color);
    background: var(--glass-dark-footer-bg);
    border: 1px solid var(--glass-dark-footer-border);
    box-shadow: var(--glass-dark-footer-shadow);
  }
}
