/* assets/custom.css */

/* 全局背景和字体 */
body {
  background-color: #F5F5F5;    /* NCBI 页面灰底 */
  font-family: Arial, "Segoe UI", Tahoma, sans-serif;
  color: #333;
  transition: background-color 0.3s ease;  /* 添加过渡效果 */
}

/* 顶部 header 容器 */
.header-container {
  background-color: #EEEEEE;    /* 浅灰顶栏 */
  padding: 1rem 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #CCCCCC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);  /* 添加柔和阴影 */
  transition: all 0.3s ease;  /* 添加过渡效果 */
}

.header-container:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);  /* 悬停时加深阴影 */
  transform: translateY(-1px);  /* 轻微上浮效果 */
}

/* 网站标题 */
.site-title {
  margin: 0;
  color: #005EA5;               /* 深蓝主色 */
  font-size: 1.75rem;
  font-weight: bold;
  transition: color 0.3s ease, transform 0.2s ease;  /* 添加过渡效果 */
}

.site-title:hover {
  color: #0077cc;  /* 轻微变亮 */
  transform: scale(1.02);  /* 轻微放大效果 */
}

.site-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-version-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background-color: #f0f4f8;
  color: #4a5568;
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1.2;
  border: 1px solid #e1e8f0;
}

/* 导航栏 */
.navbar-custom {
  display: flex;
  gap: 1rem;
}

/* 导航链接默认态 */
.nav-link-custom {
  color: #005EA5;               /* 深蓝 */
  font-size: 1rem;
  padding: 0.5rem 1rem;  /* 增加水平内边距 */
  border-radius: 0.25rem;
  text-decoration: none;
  transition: all 0.3s ease;  /* 添加过渡效果 */
  position: relative;  /* 为下划线动画做准备 */
  overflow: hidden;  /* 隐藏溢出部分 */
}

/* 导航链接悬停效果 */
.nav-link-custom:hover {
  background-color: #D55E00;    /* 橙色 */
  color: #FFFFFF;
  transform: translateY(-2px);  /* 上浮效果 */
  box-shadow: 0 2px 4px rgba(213,94,0,0.2);  /* 添加阴影 */
}

/* 导航链接点击效果 */
.nav-link-custom:active {
  transform: translateY(1px);  /* 点击时下沉 */
  box-shadow: none;
}

/* 激活态 */
.nav-link-custom.active {
  background-color: #005EA5;    /* 深蓝填充 */
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,94,165,0.2);  /* 添加阴影 */
}

/* 主区域内容容器 */
.main-container {
  background-color: #FFFFFF;
  padding: 2rem;
  border-radius: 0.5rem;  /* 增加圆角 */
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);  /* 柔和阴影 */
  transition: all 0.3s ease;  /* 添加过渡效果 */
  margin: 0 auto;  /* 居中显示 */
  max-width: 1400px;  /* 限制最大宽度 */
}

/* 为homepage特别处理 */
.homepage-bg.main-container {
  background-color: transparent;
}

.main-container:hover {
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);  /* 悬停时加深阴影 */
  transform: translateY(-2px);  /* 轻微上浮效果 */
}

/* Homepage main-container 背景图片 */
.main-container.homepage-bg {
  position: relative;
  overflow: hidden;
  background: transparent !important;  /* 强制背景透明 */
}

.main-container.homepage-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('https://picturerealm.oss-cn-chengdu.aliyuncs.com/obsidian/dna-8895875.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  z-index: 0;
  border-radius: 0.5rem;
}

.main-container.homepage-bg {
  position: relative;
  overflow: hidden;
}

.main-container.homepage-bg > * {
  position: relative;
  z-index: 1;
}

/* 页脚 */
.footer-container {
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666666;
  transition: all 0.3s ease;  /* 添加过渡效果 */
  border-top: 1px solid transparent;  /* 透明边框 */
}

.footer-container:hover {
  color: #333333;
  border-top-color: #CCCCCC;  /* 悬停时显示边框 */
}

.footer-version {
  margin-left: 12px;
  color: #888;
  font-size: 0.95em;
}

/* 按钮样式增强 */
.btn-primary {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,94,165,0.2);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* 输入框样式增强 */
.form-control {
  transition: all 0.3s ease;
  border: 2px solid #005EA5;  /* 蓝色边框 */
  box-shadow: 0 0 3px rgba(0,94,165,0.2);  /* 轻微阴影效果 */
}

.form-control:focus {
  border-color: #005EA5;
  box-shadow: 0 0 0 3px rgba(0,94,165,0.3);  /* 聚焦时的阴影加深 */
  transform: translateY(-1px);
}

.form-control:hover {
  box-shadow: 0 0 5px rgba(0,94,165,0.3);
}

/* 特定的搜索框样式 */
.search-box {
  border: 2px solid #005EA5 !important;  /* 蓝色边框，使用!important确保优先级 */
  border-radius: 4px;
  box-shadow: 0 0 5px rgba(0,94,165,0.2);
}

.search-box:focus {
  border-color: #0077cc !important;
  box-shadow: 0 0 8px rgba(0,94,165,0.4);
  outline: none;
}

/* Loading 动画样式优化 */
.loading-spinner {
  transition: all 0.3s ease;
}
