/* ========== MF601 Common Shell ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  scroll-behavior: auto;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1a1a1a;
  background: transparent;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/web/mf601/assets/img/bg-base.png") center / cover no-repeat;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 1140px;
  height: 64px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  z-index: 1000;
  display: flex;
  align-items: center;
  transform: translateY(24px);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.site-nav.is-sticky {
  transform: translateY(0);
  width: 100%;
  border-radius: 0;
}

.site-nav__inner {
  width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav__brand img {
  max-height: 104px;
  height: auto;
  width: auto;
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.site-nav__link {
  text-decoration: none;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition:
    color 0.3s ease,
    transform 0.2s ease;
  padding: 4px 0;
  display: inline-block;
}

.site-nav__link:hover {
  color: #1a1a1a;
  transform: translateY(-1px);
}

.site-nav__link:active {
  transform: translateY(0) scale(0.97);
}

.site-nav__link.is-current {
  color: #1a1a1a;
  font-weight: 600;
}

.site-nav__link.is-current::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #1a1a1a;
  border-radius: 2px;
  animation: navIndicatorIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes navIndicatorIn {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.site-nav__account {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-nav__auth-actions,
.site-nav__user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav__auth-actions[hidden],
.site-nav__user-info[hidden] {
  display: none;
}

.site-nav__login,
.site-nav__register,
.site-nav__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

.site-nav__login {
  padding: 0 20px;
  background: #1f2937;
  color: #ffffff;
  border: 1px solid #1f2937;
}

.site-nav__login:hover {
  background: #374151;
  color: #ffffff;
}

.site-nav__register,
.site-nav__logout {
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.6);
  color: #1f2937;
  border: 1px solid rgba(31, 41, 55, 0.12);
}

.site-nav__register:hover,
.site-nav__logout:hover {
  background: #ffffff;
  border-color: rgba(31, 41, 55, 0.28);
}

.site-nav__user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #1f2937;
  text-decoration: none;
}

.site-nav__user-name {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.site-nav__user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(172, 239, 210, 1);
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
}

.site-nav__logout {
  border: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

.site-footer {
  position: relative;
  background: #494a4b;
  padding: 48px 0 0;
}

.footer__main {
  width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1.2fr auto;
  gap: 32px;
}

.footer__col-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer__col-list,
.footer__contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col-list a {
  font-size: 13px;
  color: #b0b0b0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__col-list a:hover {
  color: #ffffff;
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #b0b0b0;
}

.footer__contact-item img {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.footer__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer__qr-box {
  width: 100px;
  height: 100px;
  background: #ffffff;
  border-radius: 4px;
}

.footer__qr-text {
  font-size: 11px;
  color: #999999;
  text-align: center;
  line-height: 1.4;
}

.footer__bottom-bar {
  width: 1140px;
  margin: 32px auto 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer__bottom-bar span,
.footer__bottom-bar a {
  font-size: 12px;
  color: #999999;
}

.footer__bottom-bar a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__bottom-bar a:hover {
  color: #ffffff;
}

.footer__bottom-bar .sep {
  color: #666666;
  user-select: none;
}

@media (max-width: 768px) {
  .site-nav {
    width: calc(100% - 24px);
  }

  .site-nav__inner {
    width: 100%;
    padding: 0 18px;
  }

  .site-nav__brand img {
    max-height: 72px;
  }

  .site-nav__menu {
    display: none;
  }

  .site-nav__account,
  .site-nav__auth-actions,
  .site-nav__user-info {
    gap: 8px;
  }

  .site-nav__register,
  .site-nav__logout,
  .site-nav__user-name {
    display: none;
  }

  .site-nav__login {
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
  }

  .footer__main,
  .footer__bottom-bar {
    width: calc(100% - 32px);
  }

  .footer__main {
    grid-template-columns: 1fr 1fr;
  }
}
