* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}

:root {
  --primary: #1569e6;
  --primary-dark: #1569e6;
  --light: #f8f9fa;
  --gray: #e9ecef;
  --dark: #212529;
}

header {
  background: var(--primary);
  background-color: #1569e6;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.container {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  padding-left: 4rem;
}

.nav-links {
  display: flex;
  list-style: none;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  width: 100%;
  background: var(--primary);
  scrollbar-width: thin;
  scrollbar-color: #fff #1569e6;
}

.nav-links li {
  margin-left: 3rem;
  min-width: 110px;
  flex: 0 0 auto;
  padding: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  font-size: 1.3rem;
  padding-bottom: 0.5rem;
}

.nav-links a.active {
  color: rgb(247, 184, 184);
  border-bottom: 2px solid rgb(247, 184, 184);
  font-weight: bold;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5rem;
  /* 靠左显示 */
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray);
  margin-right: 8px;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}



footer {
  position: relative;
  bottom: auto;
  width: 100%;
  margin-top: auto;
  background-color: #1569e6;
  color: white;
  padding: 0;
  text-align: center;
  z-index: 10;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-info {
  margin-bottom: 1.5rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.social-links {
  margin-bottom: 1.5rem;
}

.social-links a {
  color: white;
  margin: 0 10px;
  font-size: 1.2rem;
  text-decoration: none;
}

.copyright {
  font-size: 0.9rem;
  color: #bdc3c7;
}

/* 用户菜单样式 */
.user-menu {
  position: absolute;
  top: 70px;
  right: 20px;
  background-color: #87CEEB;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 250px;
  padding: 15px;
  z-index: 1000;
  display: none;
  animation: fadeIn 0.3s ease;
  color: black;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu.active {
  display: block;
}

.user-profile {
  display: flex;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
  border: 2px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h4 {
  margin: 0;
  color: var(--primary-color);
}

.profile-info p {
  margin: 5px 0 0;
  color: var(--subtext-color);
  font-size: 14px;
}

.menu-options {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-options li {
  margin-bottom: 8px;
}

.menu-options li a {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.menu-options li a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.menu-options li i {
  margin-right: 10px;
  color: var(--secondary-color);
}

.icon-user:before {
  content: '👤';
}

.icon-settings:before {
  content: '⚙️';
}

.icon-logout:before {
  content: '🚪';
}

/* 移动端适配优化 */
@media (max-width: 768px) {
  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1.0rem;
  }

  p {
    font-size: 0.8rem;
  }

  html,
  body {
    height: 100%;
    min-height: 100%;
  }

  body {
    display: flex;
    flex-direction: column;
    font-size: 15px;
    background: #fff;
  }

  .main-content {
    flex: 1 0 auto;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 12px;
  }

  header {
    padding: 0.7rem 0;
  }

  nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0;
  }

  .logo {
    padding: 0;
    font-size: 1.2rem;
    margin-bottom: 6px;
    text-align: center;
    width: 100%;
    display: block;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    background: var(--primary);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1px 0;
    gap: 0;
    scrollbar-width: thin;
    scrollbar-color: #fff #1569e6;
  }

  .nav-links::-webkit-scrollbar {
    height: 4px;
    background: #1569e6;
  }

  .nav-links::-webkit-scrollbar-thumb {
    background: #fff;
    border-radius: 2px;
  }

  .nav-links li {
    min-width: 110px;
    flex: 0 0 auto;
    margin: 0 2px;
    padding: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 0 0;
    width: 100%;
    text-align: center;
    display: block;
    color: #fff;
    white-space: nowrap;
  }

  .user-info {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    font-size: 1rem;
    width: 100%;
    gap: 4px;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    margin-right: 4px;
  }

  .content-section li {
    font-size: 0.9rem;
  }

  .background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    z-index: -1;
    display: flex;
    align-items: stretch;
    justify-content: center;
  }

  .full-background {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
  }

  footer {
    padding: 12px 0 6px 0;
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .contact-info,
  .social-links,
  .copyright {
    margin-bottom: 8px;
    text-align: center;
  }

  .social-links a {
    font-size: 1rem;
    margin: 0 6px;
  }

  /* 用户菜单移动端优化 */
  .user-menu {
    top: 120px;
    left: 8px;
    width: 40vw;
    min-width: 180px;
    max-width: 300px;
    padding: 2px;
  }

  .user-profile {
    flex-direction: row;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .profile-avatar {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    font-size: 18px;
  }

  .profile-info h4 {
    font-size: 1rem;
  }

  .profile-info p {
    font-size: 13px;
  }

  .menu-options li a {
    font-size: 0.98rem;
    padding: 7px 8px;
  }
}