/* 全局样式重置 */
: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;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
/*2025年6月20日13:44:28 ↓*/
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-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;
    }
    .logo:hover {
      transform: rotate(15deg);
    }

/* nav*/
.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;
    }

/* 分页导航 */
.pagination {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: clamp(6px, 0.6vw, 16px) clamp(10px, 0.8vw, 22px);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 36px;
    text-align: center;
    font-size: clamp(13px, 0.8vw, 20px);
}

.pagination a {
    color: #2989d8;
    border: 1px solid #e1e8f0;
    background-color: white;
}

.pagination a:hover {
    background-color: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #2989d8;
}

.pagination .active {
    background-color: #2989d8;
    color: white;
    border: 1px solid #2989d8;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pagination .disabled {
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px solid #e1e8f0;
    cursor: not-allowed;
}

.pagination .page-info {
    margin: 0 10px;
    color: #6c757d;
    font-size: clamp(13px, 0.8vw, 18px);
}


/* 树相关css */
.tree-container {
    padding: clamp(8px, 0.8vw, 18px);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: clamp(13px, 0.9vw, 18px);
}

.tree-header {
    padding: clamp(10px, 1vw, 22px);
    font-weight: bold;
    color: #333;
    background-color: #e9ecef;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    position: sticky;
    top: 0;
    z-index: 5;
    font-size: clamp(13px, 1vw, 20px);
}

.tree-item {
    margin-bottom: 5px;
    list-style: none;
}

.tree-item-label {
    padding: clamp(6px, 0.6vw, 14px) clamp(8px, 0.8vw, 16px);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    color: #333;
    font-size: clamp(13px, 0.9vw, 18px);
}

.tree-item-label:hover {
    background-color: #e3f2fd;
    transform: translateX(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tree-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    transition: transform 0.2s;
    color: #6c757d;
}

.tree-item-expanded .tree-icon {
    transform: rotate(180deg);
}

.tree-item-expanded .tree-icon::before {
    content: "\f107"; /* Font Awesome icon for 'chevron down' */
}

.tree-item-collapsed .tree-icon::before {
    content: "\f105"; /* Font Awesome icon for 'chevron right' */
}

.tree-item-leaf .tree-icon::before {
    content: "\f111"; /* Font Awesome icon for 'circle' */
    /* 图标大小 */
    font-size: 10px;
}

.tree-item-children {
    padding-left: 15px;
    margin-top: 5px;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tree-item-expanded .tree-item-children {
    display: block;
}


/* 侧边栏树形结构 */
.sidebar {
    position: fixed;
    top: clamp(80px, 12vh, 200px);
    bottom: clamp(30px, 5vh, 70px);
    left: 0;
    width: clamp(260px, 20vw, 400px);
    background-color: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: width 0.3s ease;
    z-index: 90;
    padding-bottom: 20px;
}

.sidebar.collapsed ~ .main-content {
    margin-left: clamp(60px, 5vw, 120px);
}

/* 主内容区域 */
.main-content {
    margin-left: clamp(270px, 20vw, 410px);
    padding: clamp(15px, 1.5vw, 35px);
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 60px);
    max-width: min(95%, 2400px);
}
.table-wrapper {
    width: 100%;
}

.table-wrapper table {
    width: 100%;
    table-layout: fixed;
}
/* 表格样式 */
.table-container {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    transition: all 0.3s;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /*定义了字体*/
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* 添加现代字体栈 */
}

.table-container th, .table-container td {
    padding: clamp(8px, 0.8vw, 20px) clamp(10px, 1vw, 24px);
    text-align: left;
    border-bottom: 1px solid #e1e8f0;
    transition: all 0.2s;
}

.table-container th {
    background-color: #f7fafc;
    position: sticky;
    z-index: 50;
    border-bottom: 2px solid #e1e8f0;
    font-weight: 700; /* 表头加粗 */
    color: #2d3748; /* 深灰色增强可读性 */
}

.table-container tr:hover {
    background-color: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.table-container td.td-entry a {
    color: #2989d8;
    text-decoration: none;
    /* 链接中等粗细 */
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
}

.table-container td.td-entry a:hover {
    color: #1a69a4;
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Species列斜体样式 */
.table-container td.td-organism {
    font-style: italic; /* 物种名称斜体 */
    color: #2d3748; /* 稍深颜色增强可读性 */
}

.table-container td {
    font-size: clamp(13px, 0.8vw, 18px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 添加这部分CSS */
.table-container td[title] {
    position: relative;
}

.table-container td[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    margin-bottom: 5px;
}

/*表格样式结束*/


/* 底部样式 */
#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; }
}