* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --colors-primary: #304881;
  --colors-subtitle: #7a8db8;
  --colors-info: #0f96ff;
  --content-padding-inline: 380px;
}
body {
  font-family: "PingFang SC", sans-serif;
  font-size: 16px;
}

.header-container {
  height: 68px;
  background: #ecf2f9;
  display: flex;
  padding-inline: var(--content-padding-inline);
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1000;
}

.header-container.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(236, 242, 249, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 吸顶时的样式 */
.header-container.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(236, 242, 249, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  will-change: transform, box-shadow;
}

/* 阴影逐渐显示的效果 */
.header-container.sticky.shadow-visible {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* 为了避免内容被吸顶的header遮挡，给body添加padding-top */
body.header-sticky {
  transition: padding-top 0.1s ease-out;
}

.logo {
  width: 100px;
  height: 40px;
}
.logo-container {
  display: flex;
  align-items: center;
}
.test-logo {
  width: 92px;
  height: 26px;
  margin-left: 24px;
}

.header-right-container {
  display: flex;
  align-items: center;
}
.link-container {
  display: flex;
  align-items: center;
  margin-right: 100px;
}
.link-item {
  font-weight: 400;
  font-size: 16px;
  color: #7c8893;
  cursor: pointer;
}
.active-link-item {
  border-bottom: 1px solid var(--colors-info);
  color: var(--colors-info);
}
.link-item:hover {
  color: var(--colors-info);
}
.link-item + .link-item {
  margin-left: 59px;
}

.login-btn {
  width: 92px;
  height: 40px;
  background: var(--colors-info);
  border-radius: 10px;
  text-align: center;
  line-height: 40px;
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
}
.main-container {
  position: relative;
}
.book-img {
  position: absolute;
  z-index: 5;
  top: 559px;
  right: 233px;
  width: 500px;
  height: 352px;
}
.top-container {
  height: 709px;
  background-image: url("./imgs/header_bg.png");
  background-size: 100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 233px;
  /* padding-left: 400px; */
}
.top-link {
  display: inline-block;
  color: var(--colors-info);
  font-weight: bold;
  font-size: 30px;
  letter-spacing: 1px;
  text-decoration-line: underline;
  margin-top: 56px;
  cursor: pointer;
  flex: none;
}
.link-arrow {
  width: 24px;
  height: 24px;
}
.text-title {
  font-family: Alimama ShuHeiTi, Alimama ShuHeiTi;
  font-weight: bold;
  color: var(--colors-primary);
}
.top-text-title {
  font-size: 60px;
  margin-bottom: 30px;
}
.bottom-text,
.mid-text,
.top-text {
  font-weight: 400;
  font-size: 24px;
  color: var(--colors-subtitle);
  margin-bottom: 8px;
}

.mid-container {
  background-color: #fff;
  height: 914px;
  padding-top: 272px;
  padding-bottom: 170px;
  padding-inline: var(--content-padding-inline);
}

.mid-text-title {
  font-size: 40px;
  margin-bottom: 30px;
}
.mid-img {
  width: 1041px;
  height: 207px;
  margin-top: 84px;
}
.bottom-container {
  position: relative;
  height: 920px;
  background-image: url("./imgs/bottom_bg.png");
  background-size: 100% 100%;
  padding-top: 187px;
  padding-inline: var(--content-padding-inline);
}

.bottom-text-title {
  font-size: 40px;
  letter-spacing: 4px;
  margin-bottom: 30px;
}
.bottom-text-title,
.bottom-text {
  position: relative;
  z-index: 1;
}
.bottom-card-container {
  margin-top: 73px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bottom-card-item {
  width: 345px;
  height: 339px;
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 10px;
}
.bottom-card-title {
  font-weight: bold;
  font-size: 20px;
  color: var(--colors-primary);
  line-height: 28px;
  margin-bottom: 26px;
}
.bottom-card-total {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 12px;
  color: #bb905f;
  margin-bottom: 25px;
}
.bottom-card-total img {
  width: 19px;
  height: 19px;
  margin-right: 5px;
}
.bottom-card-desc {
  font-weight: 500;
  font-size: 14px;
  color: var(--colors-subtitle);
  line-height: 20px;
  letter-spacing: 1px;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 20px;
}
.bottom-card-img-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bottom-card-img {
  width: 69px;
  height: 94px;
}
.footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
  background: #fff;
  font-size: 16px;
}

.userInfo {
  font-size: 20px;
  color: var(--colors-primary);
  cursor: pointer;
  position: relative;
  align-items: center;
  display: none;
}

.userInfo::after {
  content: "";
  margin-left: 8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 9px solid var(--colors-primary);
  transition: transform 0.2s ease;
}

.user-dropdown {
  position: absolute;
  width: auto;
  top: 100%;
  left: 0;
  width: 120px;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.userInfo:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  font-size: 14px;
  cursor: pointer;
  color: #2468f2;
  padding: 4px 12px;
  height: 32px;
}

.dropdown-divider {
  height: 1px;
  background-color: #e5e5e5;
  margin: 4px 0;
}
.user-dropdown {
  padding: 8px 12px;
  text-align: center;
}
