/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* 背景图片容器 */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('3.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

/* 内容包装器 */
.content-wrapper {
  position: relative;
  z-index: 1;
}

/* 顶部导航栏 */
.navbar {
  background-color: white;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

/* Logo */
.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #1a5fb4;
}

.logo a {
  text-decoration: none;
  color: inherit;
}

/* 导航链接 */
.nav-links {
  display: flex;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: #1a5fb4;
  color: white;
}

/* 欢迎横幅 */
.welcome-banner {
  background: linear-gradient(135deg, #1a5fb4 0%, #3584e4 100%);
  color: white;
  padding: 50px 40px;
  margin: 30px auto;
  max-width: 1000px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.welcome-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: bold;
}

.welcome-text {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 15px;
}

.highlight {
  color: #ffd700;
  font-weight: 600;
  font-style: italic;
}

/* 主内容容器 */
.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 功能卡片区域 */
.features-section {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  color: #1a5fb4;
  font-size: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.feature-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
  border-color: #1a5fb4;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #1a5fb4;
}

.feature-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #1a5fb4;
}

/* 页脚 */
footer {
  background-color: rgba(26, 26, 26, 0.8);
  color: #aaa;
  text-align: center;
  padding: 30px 0;
  margin-top: 50px;
}

/* 响应式优化 - 移动端 */
@media (max-width: 768px) {
  /* 导航栏 */
  .nav-container {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 15px;
  }

  .logo {
    font-size: 1.3rem;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  /* 欢迎横幅 */
  .welcome-banner {
    padding: 25px 15px;
    margin: 15px;
    border-radius: 15px;
  }

  .welcome-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .welcome-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* 主容器 */
  .container {
    margin: 20px auto;
    padding: 0 15px;
  }

  /* 功能区域 */
  .features-section {
    padding: 20px 15px;
    border-radius: 15px;
    margin-bottom: 20px;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .feature-card {
    padding: 18px;
    border-radius: 12px;
  }

  .feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .feature-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  /* Campus Feed 右上角头像 */
  .feed-user-avatar {
    top: 10px;
    right: 10px;
  }

  .feed-user-avatar img {
    width: 40px;
    height: 40px;
    border-width: 2px;
  }

  /* 动态卡片内的按钮和输入框 */
  .feature-card button,
  .feature-card input {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .feature-card .comment-input {
    font-size: 0.85rem;
    padding: 6px 8px;
  }

  /* 页脚 */
  footer {
    padding: 20px 15px;
    font-size: 0.85rem;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .logo {
    font-size: 1.1rem;
  }

  .nav-links {
    gap: 5px;
    font-size: 0.75rem;
  }

  .nav-link {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .welcome-title {
    font-size: 1.3rem;
  }

  .welcome-text {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .features-section {
    padding: 15px 10px;
  }

  .feature-card {
    padding: 15px;
  }

  .feed-user-avatar img {
    width: 35px;
    height: 35px;
  }
}

/* Campus Feed 右上角用户头像 */
.feed-user-avatar {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.feed-user-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1a5fb4;
  cursor: pointer;
  transition: transform 0.3s ease;
  background-color: white;
  padding: 2px;
}

.feed-user-avatar img:hover {
  transform: scale(1.1);
}