@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500');

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: rgba(255, 255, 255, 0);
    margin: 0;
    padding: 0;
    font-size: 0.15rem;
    /* 假设原来 12px，12 / 80 = 0.15rem */
}

/* Toggle Styles */

#viewport {
    /* 左侧内边距设置为3.125rem（相当于250px，基于80px的基准值计算） */
    
    /* 为所有属性添加过渡效果，持续时间为0.5秒，使用ease缓动函数 */
    /* 兼容不同浏览器的过渡效果设置 */
    -webkit-transition: all 0.5s ease;  /* Safari和Chrome */
    -moz-transition: all 0.5s ease;     /* Firefox */
    -o-transition: all 0.5s ease;       /* Opera */
    transition: all 0.5s ease;          /* 标准属性 */
}

#content {
    width: 100%;
    height: 12rem;
    /* 700 / 80 = 8.75rem */
    position: relative;
    margin-right: 0;
}

/* Sidebar Styles */
#sidebar {
    z-index: 1000;
    position: fixed;
    left: 3.125rem;
    width: 3.125rem;
    height: 100%;
    margin-left: -3.125rem;
    overflow: hidden;

    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}


#sidebar header {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    font-size: 0.25rem;
    line-height: 0.65rem;
    text-align: center;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar header a {
    color: #ffffff;
    display: block;
    text-decoration: none;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

#sidebar header a:hover {
    color: #00ffff;
    transform: scale(1.05);
}

#sidebar .nav {
    padding: 0.2rem 0;
    margin: 0;
    list-style: none;
}

#sidebar .nav a {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.3rem;
    color: #ffffff;
    font-size: 0.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#sidebar .nav a:hover {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    border-left: 3px solid #00ffff;
    padding-left: 0.4rem;
}

#sidebar .nav a.active {
    background: rgba(0, 255, 255, 0.15);
    border-left: 3px solid #00ffff;
    color: #00ffff;
}

#sidebar .nav a i {
    margin-right: 0.2rem;
    font-size: 0.225rem;
    width: 0.3rem;
    text-align: center;
    transition: all 0.3s ease;
    color: #ffffff;
}

#sidebar .nav a:hover i {
    transform: translateX(0.05rem);
    color: #00ffff;
}

/* 添加滚动条样式 */
#sidebar::-webkit-scrollbar {
    width: 4px;
}

#sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 为 nav 元素添加与 .box 相同的宽度和外边距 */
nav.navbar.navbar-default {
    width: 100%;
    margin: 0.2rem 0.2rem;
    box-sizing: border-box;
    background-color: transparent !important;
    border: none;
}

/* 添加标题图片容器样式 */
.title-image {
    display: flex;
    align-items: center;
    justify-content: center;
    gap:0.5rem;
}

.title-image img {
    max-width: 80%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
    transition: all 0.3s ease;
}

.title-image img:hover {
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.5));
    transform: scale(1.02);
}

.snow-lotus {
    width: 80px;
    /* 设置雪莲图片的固定宽度 */
    height: auto;
    /* 高度自动，保持比例 */
    object-fit: contain;
}

/* 主容器样式 */
.box {
    width: 100%;
    height: 13rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.2rem;
}

/* top_box 样式 */
.top_box {
    width: 100%;
    height: 3.5rem;
    display: flex;
    justify-content: space-between;
    gap: 0.2rem;
    margin-bottom: 0.15rem;
}

.top_box_left,
.top_box_middle,
.top_box_right {

    /* 每个div占据相等空间（即三分之一） */
    height: 100%;
    /* 继承父容器的高度 */
    background-color: rgba(255, 255, 255, 0) !important;

    border-radius: 0.1rem;
    box-shadow: 0 0 0.1rem rgba(0, 0, 0, 0);
    position: relative;
    display: block !important;
    border: 1px solid rgba(255, 255, 255, 0);
}
.top_box_left,
.top_box_middle
 {
flex:1;
}
.top_box_right{
    flex: 1;
}



/* middle_box 样式 */
.middle_box {
    width: 100%;
    display: flex;
    height: 6rem;
    margin-bottom: 0.15rem;
    gap: 0.2rem;
}

.middle_box_left {
    flex: 2;
    background-color: rgba(255, 255, 255, 0) !important;
    border-radius: 0.1rem;
    box-shadow: 0 0 0.1rem rgba(0, 0, 0, 0);
    height: 100%;
    border: 7px solid #005eff !important;
    position: relative;
}

/* 删除 middle_box_left 的边角样式 */
.middle_box_left::before {
    display: none !important;
}



.middle_box_right {
    flex: 1;
    height: 100%;

    position: relative;
    background-color: rgba(255, 255, 255, 0) !important;

    border: 1px solid rgba(255, 255, 255, 0);
}

/* bottom_box 样式 */
.bottom_box {
    height: 3.5rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 0.2rem;
}

.bottom_box_left {
    flex: 1;
}

.bottom_box_middle {
    flex: 1;
}

.bottom_box_right {
    flex: 1;
}

.bottom_box_left,
.bottom_box_middle,
.bottom_box_right {

    min-height: 3rem;
    background: transparent;

    border-radius: 0.1rem;
    padding: 0.2rem;
    box-shadow: 0 0.05rem 0.15rem rgba(0, 0, 0, 0);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

/* 通用标题样式 - 修改现有的样式 */
.middle_box_leftmost,
.top_box_left,
.top_box_middle,
.top_box_right,
.middle_box_left,
.middle_box_right,
.bottom_box_left,
.bottom_box_middle,
.bottom_box_right {
    color: #333;
    font-size: 0.16rem;
    position: relative;
    padding-top: 0.3rem;
    /* 为标题留出空间 */
    background: transparent;

    /* 添加边角边框 */
    border: none;
    background-clip: padding-box;

    /* 创建边角 */
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;

        /* 创建四个角的边框 */
        background:
            linear-gradient(to right, #1a2980 2px, transparent 2px) 0 0 no-repeat,
            linear-gradient(to right, #1a2980 2px, transparent 2px) 0 100% no-repeat,
            linear-gradient(to left, #1a2980 2px, transparent 2px) 100% 0 no-repeat,
            linear-gradient(to left, #1a2980 2px, transparent 2px) 100% 100% no-repeat,
            linear-gradient(to bottom, #1a2980 2px, transparent 2px) 0 0 no-repeat,
            linear-gradient(to bottom, #1a2980 2px, transparent 2px) 100% 0 no-repeat,
            linear-gradient(to top, #1a2980 2px, transparent 2px) 0 100% no-repeat,
            linear-gradient(to top, #1a2980 2px, transparent 2px) 100% 100% no-repeat;

        background-size: 0.3rem 0.3rem;
    }

    /* 添加标题样式 */
    &::after {
        content: attr(data-title);
        position: absolute;
        top: -0.15rem;
        /* 将标题向上移动以重合边框 */
        left: 50%;
        transform: translateX(-50%);
        background: rgba(255, 255, 255, 0.9);
        color: #1a2980;
        padding: 0.04rem 0.15rem;
        border-radius: 0.1rem;
        font-size: 0.18rem;
        white-space: nowrap;
        z-index: 2;
        font-weight: 600;
    }
}

/* 响应式布局 */
@media screen and (max-width: 768px) {

    .top_box,
    .middle_box,
    .bottom_box {
        flex-direction: column;
    }
    .middle_box_leftmost,
    .top_box_left,
    .top_box_middle,
    .top_box_right,
    .middle_box_left,
    .middle_box_right,
    .bottom_box_left,
    .bottom_box_middle,
    .bottom_box_right {
        width: 100%;
    
    }
}

h2 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 0.25rem;
    /* 20 / 80 = 0.25rem */
    font-size: 0.5rem;
    /* 2.5em 假设基于 12px 字体大小，2.5 * 12 / 80 = 0.375rem，这里根据实际情况调整 */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.bottom_box_left {
    position: relative;
    background: transparent !important;
    z-index: 1;

    /* 增加内边距给标题和图表留出空间 */
}

#drugPropertyContainer {
    position: relative;
    z-index: 2;
    background: transparent !important;
}

/* 背景图片样式 */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('../images/bg1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}



/* 词云 */
.wordcloud-container {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    box-shadow: none;
    border-radius: 10px;
    background-color: transparent !important;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: none;
}

.controls {
    height: 20%;
    /* padding: 0.1875rem; */
    background-color: transparent !important;
    border-top: none;
}

#wordcloud {
    flex: 1;
    width: 100%;
    height: 80%;
    position: relative;

}

.button-group {
        height: 10%;
    margin-bottom: 0.125rem;
    text-align: center;
}

.control-button {
    background-color: #7dafd8;
    color: white;
    border: none;
    padding: 0.08rem 0.15rem;
    border-radius: 0.05rem;
    cursor: pointer;
    margin: 0 0.05rem;
    font-weight: bold;
    transition: background-color 0.3s;
}

.control-button:hover {
    background-color: #d81b60;
}

#flowerShape {
    background-color: #e68bb1;
}

#uploadBtn {
    background-color: #d85a90;
}

.color-theme-group {
    margin-top: 10px;
    text-align: center;
    background-color: transparent !important;
}

.color-theme-button {
    background-color: #7dafd8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.color-theme-button:hover {
    background-color: #d81b60;
}

.color-theme-button.active {
    background-color: #7dafd8;
    outline: none;
}
.color-theme-button.active:hover {
    background-color: #d81b60;
}

/* 修改 top_box_left 的样式 */
.top_box_left {
    flex: 1;
    height: 100%;
    background-color: transparent !important;
    /* 确保背景完全透明 */
    border-radius: 0.1rem;
    box-shadow: none;
    /* 移除阴影 */
    position: relative;
    display: block !important;
    border: none;
    /* 移除边框 */
}

/* 确保内部词云图容器也是透明的 */
.top_box_left>div,
#wordcloud {
    background-color: transparent !important;
}

/* 修改标题样式以确保可见性 */
.top_box_left::after {
    background: rgba(255, 255, 255, 0.9);
    color: #1a2980;
    font-weight: 600;
}

/* 修改 top_box_right 的样式 */
.top_box_right {
    overflow: visible !important;
    /* 确保伪元素可见 */
    border-radius: 0 !important;
    /* 强制移除圆角 */
    position: relative !important;
    z-index: 1;
}

/* 确保 Highcharts 容器不会影响原有样式 */
#main_disease {
    overflow: visible !important;
    border-radius: 0 !important;
}

/* 强制保持边角样式 */
.top_box_right::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    pointer-events: none !important;
    z-index: 2 !important;
    border-radius: 0 !important;

    /* 重新定义边角样式 */
    background:
        linear-gradient(to right, #1a2980 2px, transparent 2px) 0 0 no-repeat,
        linear-gradient(to right, #1a2980 2px, transparent 2px) 0 100% no-repeat,
        linear-gradient(to left, #1a2980 2px, transparent 2px) 100% 0 no-repeat,
        linear-gradient(to left, #1a2980 2px, transparent 2px) 100% 100% no-repeat,
        linear-gradient(to bottom, #1a2980 2px, transparent 2px) 0 0 no-repeat,
        linear-gradient(to bottom, #1a2980 2px, transparent 2px) 100% 0 no-repeat,
        linear-gradient(to top, #1a2980 2px, transparent 2px) 0 100% no-repeat,
        linear-gradient(to top, #1a2980 2px, transparent 2px) 100% 100% no-repeat !important;

    background-size: 0.3rem 0.3rem !important;
}

/* 强制保持标题样式 */
.top_box_right::after {
    content: attr(data-title) !important;
    position: absolute !important;
    top: -0.15rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1a2980 !important;
    padding: 0.04rem 0.15rem !important;
    border-radius: 0.1rem !important;
    font-size: 0.18rem !important;
    white-space: nowrap !important;
    z-index: 3 !important;
    /* 确保标题在最上层 */
    font-weight: 600 !important;
}

/* .middle_box_leftmost{
    border: 5px solid rgba(138, 156, 255,1) !important;
        
} */
/* 通用容器样式 - 添加蓝色细边框 */
.middle_box_leftmost,
.top_box_left,
.top_box_middle,
.top_box_right,

.middle_box_right,
.bottom_box_left,
.bottom_box_middle,
.bottom_box_right {
    border: 3px solid rgba(138, 156, 255, 0.3) !important; /* 添加淡蓝色边框 */
    box-shadow: 0 0 8px rgb(187, 244, 255) inset, 0 0 8pxrgb(187, 244, 255);
}

/* 修改边角样式 - 加粗边角并改变颜色 */
.middle_box_leftmost::before,
.top_box_left::before,
.top_box_middle::before,
.top_box_right::before,
.middle_box_left::before,
.middle_box_right::before,
.bottom_box_left::before,
.bottom_box_middle::before,
.bottom_box_right::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    pointer-events: none !important;
    z-index: 2 !important;
    border-radius: 0 !important;
    
    /* 重新定义边角样式，使用更亮的颜色和发光效果 */
    background: 
        linear-gradient(to right, #4788fb 4px, transparent 3px) 0 0 no-repeat,
        linear-gradient(to right, #4788fb 4px, transparent 3px) 0 100% no-repeat,
        linear-gradient(to left, #4788fb 4px, transparent 3px) 100% 0 no-repeat,
        linear-gradient(to left, #4788fb 4px, transparent 3px) 100% 100% no-repeat,
        linear-gradient(to bottom, #4788fb 4px, transparent 3px) 0 0 no-repeat,
        linear-gradient(to bottom, #4788fb 4px, transparent 3px) 100% 0 no-repeat,
        linear-gradient(to top, #4788fb 4px, transparent 3px) 0 100% no-repeat,
        linear-gradient(to top, #4788fb 4px, transparent 3px) 100% 100% no-repeat !important;
    
    background-size: 0.4rem 0.4rem !important; /* 增加边角长度 */
    filter: drop-shadow(0 0 4px rgba(71, 136, 251, 0.8)) !important; /* 增强发光效果 */
}

/* 修改标题样式 - 蓝色背景白色文字 */
.middle_box_leftmost::after,
.top_box_left::after,
.top_box_middle::after,
.top_box_right::after,
.middle_box_left::after,
.middle_box_right::after,
.bottom_box_left::after,
.bottom_box_middle::after,
.bottom_box_right::after {
    content: attr(data-title) !important;
    position: absolute !important;
    top: -0.3rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(90deg, #1a2980 0%, #26d0ce 100%) !important; /* 渐变蓝色背景 */
    color: #ffffff !important; /* 白色文字 */
    padding: 0.04rem 0.15rem !important;
    border-radius: 0.1rem !important;
    font-size: 0.3rem !important;
    white-space: nowrap !important;
    z-index: 3 !important;
    font-weight: 600 !important;
    box-shadow: 0 0 10px rgba(26, 41, 128, 0.3) !important; /* 添加发光效果 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important; /* 添加文字阴影 */
}

/* 确保所有容器都有正确的定位和层级 */
.middle_box_leftmost,
.top_box_left,
.top_box_middle,
.top_box_right,
.middle_box_left,
.middle_box_right,
.bottom_box_left,
.bottom_box_middle,
.bottom_box_right {
    position: relative !important;
    z-index: 1;
    overflow: visible !important;
}

/* 新增 middle_box_leftmost 样式 */
.middle_box_leftmost {
    flex: 1;
    height: 100%;
    min-height: 4rem;  /* 增加最小高度 */
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);

}
/* //修改 middle_box_left 的标题样式 */
.middle_box_left::after {

    font-size: 0.45rem !important;

}
