/* 全局样式重置 */
:root {
  --primary-color: #3498db;
  --secondary-color: #2980b9;
  --accent-color: #e74c3c;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --gray-color: #6c757d;
  --success-color: #28a745;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --content-width: 68vw;
  --search-control-height: clamp(30px, 3vw, 60px);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
    font-family: Arial, sans-serif;
}
/*以上为全局设置*/
/*2025年6月20日14:02:14 ↓*/
body {
    margin: 0;
    padding: 0;
    padding-bottom: clamp(30px, 5vh, 90px);
    font-family: Arial, sans-serif;
    background-color: #f8fafc;
  }

/*以下为头部设置*/
.header {
      background-color: #2989d8;
      color: white;
      display: flex;
      /* 放在两侧 */
      justify-content: space-between;
      /* 居中显示 */
      align-items: center;
      padding: clamp(12px, 2.5vh, 54px) clamp(20px, 3vw, 64px);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影增强悬浮效果 */
      position: sticky; /* 关键属性 */
      top: 0; /* 固定在顶部 */
      z-index: 1000; /* 确保在其他内容之上 */
      transition: background-color 0.3s ease; /* 可选：添加过渡效果 */
    }
    .header:hover {
      background-color: #1a69a4;
    }

/*logo*/
.logo-container {
      display: flex;
      align-items: center;
    }
    .logo {
      width: clamp(28px, 3.8vh, 65px);
      height: clamp(28px, 3.8vh, 65px);
      margin-right: clamp(6px, 0.8vw, 16px);
      transition: transform 0.3s ease;
    }
    .logo:hover {
      transform: rotate(15deg);
    }
    .logo-text {
      font-size: clamp(16px, 2.3vh, 50px);
      font-weight: bold;
    }
    .logo-text_2 {
      font-size: clamp(12px, 1.6vh, 35px);
      font-weight: bold;
      white-space: nowrap;
    }

.nav {
      margin-top: clamp(6px, 1.2vh, 26px);
    }
    .nav-list {
      display: flex;
      list-style: none;
      margin: 0;
      padding: 0;
      flex-wrap: wrap;
    }
    .nav-item {
      margin-right: clamp(8px, 1vw, 24px);
      margin-bottom: 5px;
    }
    .nav-link {
      color: white;
      text-decoration: none;
      font-size: clamp(14px, 1.6vh, 32px);
      padding: clamp(4px, 0.8vh, 18px) clamp(8px, 1vw, 20px);
      border-radius: 4px;
      transition: all 0.3s;
      display: inline-block;
      white-space: nowrap;
    }
    .nav-link:hover {
      background-color: rgba(255, 255, 255, 0.2);
      transform: translateY(-1px);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    .active {
      background-color: rgba(255, 255, 255, 0.2);
      font-weight: 500;
    }
/* 2025年6月20日14:04:13 ↑*/
/*以上为头部导航栏设置*/


/* 现代化改造 */
.modern-search {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: clamp(1rem, 1.5vw, 3.5rem);
    margin-bottom: clamp(1rem, 2vw, 3rem);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.5rem;
    font-size: clamp(1rem, 1.4vw, 2.5rem);
}

.search-header i {
    font-size: clamp(1.2rem, 1.5vw, 2.5rem);
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    padding: clamp(6px, 0.6vw, 16px);
    border-radius: 10px;
}


/*以下为查找相关*/
.search-button {
  padding: 8px 12px;
  border: none;
  background-color: white;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  outline: none;
}
.search-section {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-top: clamp(0.6rem, 1vw, 1.5rem);
}

.search-bar input,
.search-bar select{
  flex-grow: 1;
  padding: clamp(8px, 0.8vw, 18px) clamp(12px, 1vw, 22px);
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: clamp(0.9rem, 1vw, 1.8rem);
  transition: var(--transition);
}

.search-bar input:focus,
.search-bar select:focus{
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-bar button {
  padding: clamp(8px, 0.8vw, 18px) clamp(14px, 1.2vw, 28px);
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  font-size: clamp(0.9rem, 0.9vw, 1.6rem);
}

.search-bar button:hover {
  background-color: var(--secondary-color);
}

.examples {
  display: flex;
  gap: 15px;
  margin-top: clamp(0.8rem, 1.2vw, 2rem);
  flex-wrap: wrap;
}

.examples-label {
  display: flex;
  align-items: center;
  color: var(--dark-color);
  font-size: clamp(0.8rem, 0.8vw, 1.5rem);
  line-height: 1;
}

.example-item {
  padding: clamp(6px, 0.6vw, 14px) clamp(10px, 0.8vw, 20px);
  background-color: var(--light-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: clamp(0.8rem, 0.8vw, 1.5rem);
  transition: var(--transition);
}

.example-item:hover {
  background-color: var(--primary-color);
  color: white;
}
/*以上为查找相关*/

/*以下为blast相关*/

.blast-button {
  padding: 8px 12px;
  border: none;
  background-color: white;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  outline: none;
}
.blast-section {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
}

.blast-bar {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
}

.blast-bar input {
  flex-grow: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.blast-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.blast-bar button {
  padding: 12px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.blast-bar button:hover {
  background-color: var(--secondary-color);
}

/*以上为blast相关*/

/*以下为内容介绍部分*/
.container {
  width: var(--content-width);
  max-width: none;
  margin: 0 auto;
  padding: 0;
}
.container_2 {
  max-width: 100%;
  margin: 0 auto;
}

.highlight {
  font-weight: bold;
  color: var(--primary-color);
}
h1 {
  font-size: clamp(1.4rem, 2.5vw, 5.5rem);
  margin-bottom: 2rem;
  color: var(--dark-color);
  text-align: center;
}
h3 {
  text-align: left;
}
.intro-text {
  width: 88%;
  margin: 0 auto;
  font-size: clamp(0.9rem, 1.1vw, 2.2rem);
  line-height: 1.75;
}

.intro-text p {
  margin: 0 0 clamp(0.8rem, 1vw, 1.8rem);
}

.intro-text p:last-child {
  margin-bottom: 0;
}
/*2025年6月23日20:01:25，lw，home格式*/
h2 {
    color: #2980b9;
    margin-top: 30px;
}

h3 {
    color: #3498db;
}

ul {
    padding-left: 20px;
}
.intro-wrapper {
    width: 100%;
    background: #f0f7ff;
}

.content-section {
    padding: clamp(16px, 2vw, 40px) clamp(16px, 2vw, 40px) clamp(32px, 4vw, 80px);
}
/*2025年6月23日20:01:50，lw，home格式*/
/*以上为内容介绍部分*/

/*以下为跳转部分*/
.organism-item img{
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

hr {
  border: 1px solid #ccc;
}
.main-content {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .two-columns {
    display: grid;
    /*grid-template-columns: repeat(2, 1fr);*/
    grid-template-columns: 6fr 4fr;
    gap: 2rem;
  }
  .left-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .right-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.category-section {
  background-color: white;
  border-radius: var(--border-radius);
  padding: clamp(1rem, 1.5vw, 2.5rem);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
  font-size: clamp(0.85rem, 0.9vw, 1.4rem);
}

.category-title {
  font-size: clamp(1.1rem, 1.3vw, 2.2rem);
  margin-bottom: 1rem;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-icon {
  display: inline-block;
  width: 1em; /* 使用em单位保持响应性 */
  height: 1em;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
}

.custom-icon-mushroom {
  width: 28px; /* 增大到 32px */
  height: 28px;
  background-image: url('../../static/images/icons8-蘑菇-64.png');
}
.custom-icon-sar {
  width: 28px; /* 增大到 32px */
  height: 28px;
  background-image: url('../../static/images/icons8-藻类-100.png');
}

/* 下拉菜单样式 */
.dropdown-header {
  display: flex;
  font-size: 1.3rem;
  align-items: center;
  color: var(--dark-color);
  cursor: pointer;
  padding: 10px 15px;
  transition: var(--transition);
  gap: 10px;
}

.dropdown-header:hover {
  background-color: rgba(52, 152, 219, 0.05);
}

/*以上为二级菜单部分*/
/*以上为跳转部分*/
/*以下是链接部分*/
.database-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* 链接之间的间距 */
}

.database-link {
    padding: 8px 12px;
    background-color: #f0f7f5; /* 背景颜色 */
    color: #3498db; /* 文字颜色 */
    text-decoration: none;
    border-radius: 4px; /* 圆角 */
    transition: all 0.3s ease; /* 过渡效果 */
}

.database-link:hover {
    background-color: #3498db; /* 悬停时的背景颜色 */
    color: white; /* 悬停时的文字颜色 */
}
/*以上是链接部分*/


/* 底部样式 */
#bottom {
            background-color: #2989d8;
            color: #ccc7d5;
            font-size: clamp(10px, 1.5vh, 32px);
            padding: clamp(5px, 1.2vh, 26px) 0;
            position: fixed;
            bottom: 0;
            width: 100%;
            text-align: center;
            box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
            z-index: 100;
            transition: background-color 0.3s ease;
        }
        #bottom:hover {
            background-color: #1a69a4;
        }
/* 打印时取消固定定位 */
@media print {
    .header, #bottom { position: static; }
}
/* 修复对齐问题 */
.form-group-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    min-height: clamp(44px, 4vw, 80px);
}

.form-group-container .form-group {
    display: flex;
    align-items: center;
    height: var(--search-control-height);
}

.form-group-container select,
.form-group-container input {
    height: var(--search-control-height);
    vertical-align: middle;
}

.form-group-container .search-bar button {
    height: var(--search-control-height);
    padding-top: 0;
    padding-bottom: 0;
}

/* 确保所有表单元素对齐 */
.blast-form-group-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 1vw, 16px);
    align-items: flex-start;
    width: 100%;
    margin-bottom: clamp(10px, 1vw, 16px);
}

.blast-form-group-container .form-group {
    width: 100%;
    min-width: 0;
}

.blast-form-group-container input,
.blast-form-group-container select {
    width: 100%;
    height: var(--search-control-height);
    box-sizing: border-box;
    padding: 0 clamp(12px, 1vw, 22px);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: clamp(0.85rem, 0.9vw, 1.6rem);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: clamp(0.8rem, 0.8vw, 1.3rem);
    color: var(--dark-color);
    font-weight: 500;
}
/* 确保下拉框和输入框高度一致 */
.form-control,
select.form-control{
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: clamp(0.85rem, 0.9vw, 1.6rem);
    height: var(--search-control-height);
    box-sizing: border-box;
}




/* ===== 新增：分类标题现代化样式 ===== */
.classification-title {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--dark-color);
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.classification-title:hover {
    color: var(--primary-color);
}

.classification-title i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

/* ===== 新增：分类项现代化样式 ===== */
.category-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 80px;        /* ← 可选：确保最小高度一致（推荐） */
    gap: 8px;
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
    border-left-color: var(--secondary-color);
}

.category-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-link:hover {
    color: var(--primary-color);
}

.category-stats {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: auto; /* ← 核心：推到容器底部 */
}

/* ===== AFP-DB 统一搜索卡片 ===== */
.afpdb-search-card {
    padding: clamp(18px, 1.8vw, 44px);
}

#search-in-afp-db,
#keyword-search,
#sequence-search {
    scroll-margin-top: clamp(70px, 8vh, 120px);
}

.afpdb-card-header {
    margin-bottom: clamp(14px, 1.4vw, 32px);
}

.afpdb-card-header h3 {
    font-size: clamp(1.35rem, 1.6vw, 3rem);
    color: var(--primary-color);
}

.afpdb-card-header i {
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.afpdb-search-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(16px, 1.5vw, 34px);
    align-items: stretch;
}

.afpdb-search-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(16px, 1.2vw, 30px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.afpdb-search-panel .search-container {
    width: 100%;
}

.afpdb-search-panel .search-header h3 {
    font-size: clamp(1rem, 1.15vw, 2rem);
}

.afpdb-search-panel .examples {
    margin-top: auto;
    padding-top: clamp(12px, 1vw, 22px);
}

.keyword-search-row {
    --keyword-control-height: var(--search-control-height);
    display: grid;
    grid-template-columns: clamp(170px, 18%, 230px) minmax(280px, 1fr) auto;
    column-gap: clamp(10px, 1vw, 16px);
    align-items: center;
    min-height: auto;
}

.keyword-search-row > .form-group,
.keyword-search-row > .search-bar {
    display: flex;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
    min-height: 0;
}

.keyword-search-row .form-group,
.keyword-search-row .search-bar {
    height: var(--keyword-control-height);
}

.keyword-search-row #search-input-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.keyword-search-row #search-input-container .form-group {
    width: 100%;
}

.keyword-search-row select,
.keyword-search-row #search-input-container input {
    width: 100%;
    height: var(--keyword-control-height);
    min-height: var(--keyword-control-height);
    padding-top: 0;
    padding-bottom: 0;
    line-height: var(--keyword-control-height);
}

.keyword-search-row button {
    width: auto;
    height: var(--keyword-control-height);
    min-height: var(--keyword-control-height);
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
    white-space: nowrap;
}

.sequence-search-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    column-gap: clamp(10px, 1vw, 16px);
    align-items: center;
    min-height: auto;
}

.sequence-search-row > .search-bar {
    display: flex;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
    height: var(--search-control-height);
    min-height: 0;
}

.sequence-search-row #sequence-input-container,
.sequence-search-row #sequence-input-container .form-group {
    width: 100%;
}

.sequence-search-row #sequence-input-container input {
    width: 100%;
    height: var(--search-control-height);
    min-height: var(--search-control-height);
    padding-top: 0;
    padding-bottom: 0;
    line-height: var(--search-control-height);
}

.sequence-search-row button {
    height: var(--search-control-height);
    min-height: var(--search-control-height);
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .keyword-search-row,
    .sequence-search-row {
        grid-template-columns: 1fr;
    }

    .keyword-search-row button,
    .sequence-search-row button {
        width: 100%;
    }
}

#search-type,
#search-type option {
    text-align: center;
    text-align-last: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-group-container {
        flex-direction: column;
        gap: 8px;
    }

    .form-group {
        width: 100%;
    }

    .blast-form-group-container {
        grid-template-columns: 1fr;
    }
}

/* ===== Predictor 快速跳转卡片 ===== */
.predictor-jump-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(14px, 1.2vh, 36px) clamp(24px, 2.5vw, 56px);
    margin-bottom: 1.5rem;
}

.predictor-jump-card .search-header {
    margin-bottom: 0;
}

.predictor-jump-card .search-header i {
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.predictor-jump-card-body {
    display: flex;
    align-items: center;
    padding-top: 0;
}

.predictor-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: clamp(6px, 0.5vh, 14px) clamp(14px, 1vw, 24px);
    background-color: var(--primary-color);
    color: white;
    font-size: clamp(13px, 0.9vw, 26px);
    font-weight: 500;
    border-radius: var(--border-radius);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.predictor-link:hover {
    background-color: var(--secondary-color);
}

.predictor-link i {
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.predictor-link:hover i {
    transform: translateX(3px);
}

@media (max-width: 600px) {
    .predictor-jump-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* Contact Us 区域响应式增强 */
.right-column a {
    font-size: clamp(0.85rem, 0.9vw, 1.4rem) !important;
}

.right-column p {
    font-size: clamp(0.85rem, 0.9vw, 1.4rem) !important;
}

.right-column li {
    margin-bottom: clamp(4px, 0.5vw, 12px) !important;
}
