/* 基础样式 */
.banner {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: 2rem;
  }
  
  .jumbotron {
    background: rgba(255, 255, 255, 0.479);
    padding: 2rem;
    border-radius: 10px;
    margin-top: -100px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  
  .highlights {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    text-align: center;
  }
  
  .highlights .icon {
    height: 50px;
    display: block;
    margin: 0 auto;
  }
  
  .profile-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
  }
  
  .profile-card img {
    max-width: 200px;
    border-radius: 50%;
    float: left;
    margin-right: 2rem;
  }
  
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 2rem 0;
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
  }
  
  button {
    background: #2c6e3c; /* 华农绿色 */
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }

/* 响应式表格 */
@media (max-width: 768px) {
    table { display: block; overflow-x: auto; }
  }

  /* 设置整个页面的背景 */
body {
    background-image: url('assets/images/background.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #377637; /* 备用背景色 */
  }
  
  /* 添加半透明遮罩层提高文字可读性 */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.856);
    z-index: -1;
  }

/* 导航栏背景 */
.navbar {
    background-color: #0b2e14; /* 设置背景颜色为深绿色 */
    background-size: cover;
    background-position: center;
  }
  
  /* 页脚背景 */
  .page-footer {
    background-image: url('images/footer-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 2rem 0;
  }

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: "SimHei", "Georgia", serif;
    font-weight: bold;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #2c3e50;
  }
  
  h1 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.3em;
  }
  
  /* 段落样式 */
  p {
    margin-bottom: 1.2em;
    text-align: justify;
    line-height: 1.8;
  }
  
  /* 链接样式 */
  a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.3s;
  }
  
  a:hover {
    color: #e74c3c;
    text-decoration: underline;
  }
  
  /* 导航栏样式 */
  .navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 1rem;
  }
  
  .navbar-brand {
    color: white; /* 设置字体颜色为白色 */
    font-size: 1.5rem;
    font-weight: bold;
  }
  
  .nav-link {
    color: white; /* 设置字体颜色为白色 */
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: all 0.3s;
  }
  
  .nav-link:hover {
    background-color: rgba(9, 55, 8, 0.1);
  }
  
  /* 卡片样式（用于团队成员、研究成果等） */
  .card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 1.5rem;
    background-color: rgba(255, 255, 255, 0.9);
  }
  
  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
  }
  
  .card-img-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    height: 200px;
    object-fit: cover;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  /* 响应式调整 */
  @media (max-width: 768px) {
    body {
      font-size: 1rem;
    }
    
    .navbar-collapse {
      background-color: white;
      padding: 1rem;
      border-radius: 4px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
  }

/* 音乐播放器 */
.music-player {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
}

.music-player button {
    background: #003366;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.music-player button:hover {
    background: #002244;
}

/* ===== 平滑滚动设置 ===== */
html {
  scroll-behavior: smooth; /* 启用原生平滑滚动 */
  scroll-padding-top: 2rem; /* 防止固定导航栏遮挡内容 */
}

/* ===== 全局动画过渡优化 ===== */
* {
  transition-property: background, color, opacity, transform, box-shadow; /* 只对常用属性应用过渡 */
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 平滑的缓动曲线 */
}

/* 禁用部分元素动画以获得性能优化 */
a, button, .no-transition {
  transition: none !important;
}

/* ===== 关键动画性能优化 ===== */
@media (prefers-reduced-motion: no-preference) {
  .smooth-transform {
    transform: translateZ(0); /* 启用GPU加速 */
    backface-visibility: hidden; /* 修复闪烁问题 */
    perspective: 1000px;
  }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.3);
}

/* ===== 页面过渡动画 ===== */
.fade-enter {
  opacity: 0;
  transform: translateY(20px);
}

.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), 
              transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ===== 特殊滚动容器优化 ===== */
.scroll-container {
  scroll-snap-type: y proximity; /* 滚动吸附效果 */
  overflow-y: scroll;
  overscroll-behavior: contain; /* 防止滚动链 */
}

.scroll-section {
  scroll-snap-align: start;
}
