body {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: white;
    font-family: "Manrope", serif;
}

.add-box,
.table-box {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

input {
    padding: 10px;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    padding: 10px 20px;
    background-color: #CFDC85;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #f9f9f9;
}

.delete-btn {
    background-color: #f44336;
    padding: 5px 10px;
    font-size: 12px;
}



/* ===== 新增：导航栏样式 ===== */
/*导航栏*/
.navbar {
    background-color: rgba(194, 239, 246, 0.95);
    color: #00838f;
    width: 100%;
    max-width: 100%;
    height: 100px;
    margin: 0;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: none;
    width: 100%;
    height: 100px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    box-sizing: border-box;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 0.02em;
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    color: #00838f;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(204, 128, 128, 0.1);
    color: #006064;
}

.nav-logo img {
    height: 48px;
    /* 统一图片高度 */
    width: auto;
}

/* ===== 下拉菜单样式 - 与导航栏风格统一 ===== */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle .fa-chevron-down {
    transition: transform 0.25s ease;
    font-size: 0.7em;
    margin-left: 6px;
}

.dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* 下拉菜单面板 - 使用与导航栏一致的配色 */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    transform-origin: top center;
    background: rgba(194, 239, 246, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 190px;
    box-shadow: 0 8px 25px rgba(0, 131, 143, 0.15);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(0, 131, 143, 0.15);
    z-index: 1000;
    pointer-events: none;
}

/* 下拉菜单三角箭头 - 使用导航栏配色 */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid rgba(194, 239, 246, 0.98);
    filter: drop-shadow(0 -1px 2px rgba(0, 131, 143, 0.05));
}

/* 悬停时展开 */
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    height: auto;
    display: block;
    padding: 2px 8px;
}

/* 下拉菜单选项 - 与导航栏链接风格一致 */
.dropdown-menu a {
    color: #00838f;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.95rem;
    gap: 12px;
    white-space: nowrap;
    justify-content: flex-start;
    background: transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

/* 下拉菜单悬停效果 - 与导航栏一致 */
.dropdown-menu a:hover {
    background: rgba(0, 131, 143, 0.08);
    color: #006064;
}

/* 下拉菜单图标颜色 - 与导航栏保持一致 */
.dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: #00838f;
    opacity: 0.8;
}

.dropdown-menu a:hover i {
    opacity: 1;
}

/* 移动端响应式 - 下拉保持可用 */
@media (max-width: 768px) {
    .navbar {
        height: auto;
        min-height: 80px;
    }

    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        gap: 5px;
        margin-top: 5px;
        width: 100%;
    }

    .nav-menu li {
        height: auto;
    }

    .dropdown-menu {
        left: 0;
        transform: translateX(0) translateY(-5px);
        top: 100%;
        min-width: 160px;
    }

    .dropdown:hover .dropdown-menu {
        transform: translateX(0) translateY(0);
    }
}



/* 数据库介绍模块样式 */
.db-intro-container {
    background: white;
    border-radius: 0;
    padding: 40px 80px;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    min-height: 500px;
    position: relative;
    overflow: hidden;
    background-image: url("/static/img/background(1).png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* 整体靠右 */
    text-align: right;
    /* 文字右对齐 */
    box-sizing: border-box;
}

/* 标题容器 */
.db-intro-header {
    width: 60%;
    /* 🔥 标题占右侧60% */
    display: block;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0f7fa;
}



/* 数据库全称标题样式 */
.database-title {
    font-family: "Manrope", sans-serif;
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.03em;
    line-height: 1.4;
    margin: 0;
    text-align: right;
    /* 右对齐 */
}

/* 高亮核心字母 */
.database-title .hl {
    color: #42c0cb;
    font-weight: 900;
}

.db-intro-header h2 .highlight {
    color: #42c0cb;
    /* 与你页面按钮/图表一致的青蓝色 */
    font-weight: 900;
}

/* 内容区域 */
.db-intro-content {
    width: 60%;
    /* 🔥 内容占右侧60% */
    font-size: 17px;
    color: #006064;
    line-height: 1.7;
    text-align: right;
}


/* ===== 数据统计 ===== */

/* 图表容器 */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    margin: 0 auto;
}

/* 头部控制栏 */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    text-align: center;
}

.chart-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ===== 下拉选择框通用样式 ===== */
.species-select,
.data-type-select,
.tool-select {
    padding: 6px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    color: #334155;
    background-color: white;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    min-width: 130px;
}

.species-select:hover,
.data-type-select:hover,
.tool-select:hover {
    border-color: #42c0cb;
}

.species-select:focus,
.data-type-select:focus,
.tool-select:focus {
    outline: none;
    border-color: #42c0cb;
    box-shadow: 0 0 0 3px rgba(66, 192, 203, 0.15);
}

/* ===== Tool 选择框（默认隐藏） ===== */
.tool-select {
    display: none;
    transition: all 0.3s ease;
    min-width: 120px;
}

.tool-select.show {
    display: inline-block;
    animation: fadeInTool 0.3s ease;
}

@keyframes fadeInTool {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== 下载菜单 ===== */
.download-menu-container {
    position: relative;
    display: inline-block;
}

.download-menu-btn {
    padding: 6px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.download-menu-btn:hover {
    border-color: #42c0cb;
    background: #f8fafc;
    color: #1e293b;
}

.menu-icon {
    font-size: 18px;
    line-height: 1;
}

/* 下拉菜单 */
.download-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    padding: 4px;
}

.download-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 16px;
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 6px;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
}

.dropdown-item:first-child {
    margin-top: 2px;
}

.dropdown-item:last-child {
    margin-bottom: 2px;
}

/* ===== 图表容器 ===== */
#splicingChart {
    width: 100%;
    height: 550px;
    margin: 0 auto;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .chart-header {
        flex-direction: column;
        align-items: stretch;
    }

    .chart-title {
        font-size: 20px;
    }

    .chart-controls {
        justify-content: center;
        gap: 10px;
    }

    .species-select,
    .data-type-select,
    .tool-select {
        min-width: 120px;
        padding: 6px 14px;
        font-size: 13px;
    }

    #splicingChart {
        height: 450px;
    }
}

@media (max-width: 640px) {
    .chart-container {
        padding: 16px;
    }

    .chart-title {
        font-size: 18px;
    }

    .chart-controls {
        gap: 8px;
    }

    .species-select,
    .data-type-select,
    .tool-select {
        min-width: 100px;
        font-size: 12px;
        padding: 5px 12px;
        padding-right: 30px;
    }

    .download-menu-btn {
        padding: 5px 12px;
        font-size: 16px;
    }

    #splicingChart {
        height: 350px;
    }

    .download-dropdown {
        min-width: 150px;
        right: -10px;
    }

    .dropdown-item {
        padding: 8px 14px;
        font-size: 13px;
    }
}