/* 初始化页面的基本样式 */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    height: 100vh; /* 设置页面高度为视口高度 */
    overflow-x: hidden;
}

.youqing_div {
    width: calc(100% - 40px);
    padding: 10px;
}

.youqing_title {
    background-color: #D7D7D7;
    width: 100%;
    height: 30px;
    line-height: 30px;
    padding: 5px 10px;
    border-radius: 5px;
}

.type_div {
    width: calc(100% - 40px);
    padding: 10px;
}

.type_title {
    background-color: #6699ff;
    width: 100%;
    height: 30px;
    line-height: 30px;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 5px;
}

.foot{
    color: #cacaca;
    width: 100%;
    padding: 0px 10px;
}

.area{
    width: 100%;
    background-color: #FFFFFF;
    border-bottom: 1px solid #666666;
    position: fixed;
    z-index: 99999;
}

/* A区域的样式 */
.area-A {
    width: 200px; /* 默认宽度 */
    height: 80px; /* 默认高度为80px */
    color: white; /* 文本颜色 */
    display: flex;
    align-items: center; /* 垂直居中内容 */
    justify-content: space-between; /* A1左对齐，A2右对齐 */
}

/* A1和A2的样式 */
.area-A1, .area-A2 {
    display: flex;
    align-items: center; /* 垂直居中内容 */
    justify-content: center; /* 水平居中内容 */
    color: white; /* 文本颜色 */
}

.area-A1 {
    ;
}

.area-A1 img {
    width: 100%;
    height: 100%;
}

.area-A2 {
    ;
}

.area-A2 img {
    width: 100%;
    height: 100%;
}

/* B区域的样式 */
.area-B {
    flex: 1; /* 默认占据剩余空间 */
    height: 80px; /* 默认高度为80px */
    display: flex;
    align-items: center; /* 垂直居中内容 */
    justify-content: flex-end; /* 横向右对齐 */
    position: relative; /* 相对定位用于子菜单定位 */
    overflow: hidden; /* 确保超出区域的内容不显示 */
    transition: opacity 0.3s ease; /* 添加过渡效果 */
}

/* 菜单容器 */
.menu {
    display: flex;
    flex-direction: row; /* 默认横向排列 */
    align-items: center;
    width: auto; /* 自动宽度 */
}

/* 一级菜单项的样式 */
.menu-item {
    width: 100px; /* 宽度为100px */
    height: 80px; /* 默认高度为80px */
    display: flex;
    align-items: center; /* 垂直居中内容 */
    justify-content: center; /* 水平居中内容 */
    position: relative; /* 相对定位用于子菜单定位 */
    cursor: pointer; /* 鼠标悬停时显示手形光标 */
    color: black; /* 文本颜色 */
    border: none; /* 去除边框 */
    color: black;
    font-weight: 400;
}

.menu-item span{
    padding: 0px 10px;
}

/* 二级菜单的样式 */
.sub-menu {
    display: none; /* 默认隐藏 */
    flex-direction: column;
    position: absolute;
    left: 0;
    background-color: lightsteelblue;
    width: 100%; /* 二级菜单宽度与一级菜单项相同 */
    z-index: 20; /* 确保子菜单在其他内容之上 */
}

/* 二级菜单项的样式 */
.sub-menu-item {
    height: 60px; /* 高度为60px */
    display: flex;
    align-items: center; /* 垂直居中内容 */
    justify-content: center; /* 水平居中内容 */
    border-bottom: 1px solid #dddddd;
    color: black; /* 文本颜色 */
}

/* 展开二级菜单 */
.menu-item.active .sub-menu {
    display: flex;
}

/* 响应式设计: 宽度小于等于800px时的样式 */
@media (max-width: 800px) {
    body {
        flex-direction: column; /* 垂直排列 */
        height: auto; /* 高度自适应内容 */
    }

    .area-A {
        width: 100%; /* A区域宽度100% */
        height: 60px; /* 高度调整为60px */
        justify-content: space-between; /* A1左对齐，A2右对齐 */
        background-color: white; /* 默认背景颜色 */
    }

    .area-A1 {
        width: 120px; /* 宽度调整为120px */
        height: 60px; /* 高度调整为60px */
    }

    .area-A2 {
        width: 60px; /* 高度与宽度相同 */
        height: 60px; /* 高度调整为60px */
    }

    .area-B {
        width: 200px; /* 固定宽度为200px */
        position: fixed; /* 悬浮在右侧 */
        top: 60px; /* 下移60px（A区域高度） */
        right: 0;
        background-color: #222222; /* 在小屏幕下背景颜色为白色 */
        display: flex;
        flex-direction: column; /* 垂直排列菜单项 */
        align-items: flex-start; /* 文案左对齐 */
        justify-content: flex-start; /* 文案左对齐 */
        height: auto; /* 动态高度，由JS调整 */
        z-index: 10; /* 确保B区域在A区域之上 */
        padding: 0; /* 去除内边距 */
    }

    .menu {
        width: 200px; /* 在小屏幕下菜单宽度为200px */
        flex-direction: column; /* 垂直排列菜单项 */
    }

    .menu-item {
        width: 200px; /* 在小屏幕下菜单项宽度为200px */
        height: 60px; /* 高度设置为60px */
        justify-content: flex-start; /* 文案左对齐 */
        padding-left: 0; /* 去除内边距 */
        border-bottom: 1px solid #666666;
        color: #FFFFFF;
    }

    .sub-menu {
        margin-top: 60px; /* 确保子菜单下方有足够的空间 */
    }
}

/* 响应式设计: 宽度大于800px时的样式 */
@media (min-width: 801px) {
    .area-A {
        height: 80px; /* 高度为80px */
    }

    .area-A1 {
        width: 160px; /* 宽度调整为160px */
        height: 80px; /* 高度为80px */
    }

    .area-A2 {
        width: 80px; /* 高度与宽度相同 */
        height: 80px; /* 高度为80px */
        display: none; /* 隐藏A2 */
    }

    .area-B {
        width: auto; /* 自动宽度 */
        height: 80px; /* 高度为80px */
        display: flex;
        align-items: center; /* 垂直居中内容 */
        justify-content: flex-end; /* 横向右对齐 */
        padding: 0; /* 去除内边距 */
    }

    .menu {
        flex-direction: row; /* 横向排列菜单项 */
        width: auto; /* 自动宽度 */
        align-items: center;
    }

    .menu-item {
        width: 100px; /* 宽度为100px */
        height: 80px; /* 高度为80px */
        justify-content: center; /* 文案居中对齐 */
        padding-left: 0; /* 去除内边距 */
    }

    .sub-menu {
        margin-top: 80px; /* 确保子菜单下方有足够的空间 */
    }
}

.grid-container {
    display: grid;
    gap: 10px;
    padding: 10px;
    margin: 0 auto;
}
.search-container {
    padding: 80px 20px 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.search-box {
    height: 40px;
    width: alc(100% - 80px);
    max-width: 1000px;
    padding: 0 10px;
    border: 2px solid #007bff;
    border-radius: 5px 0 0 5px;
    background-color: #f9f9f9; 
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
}

.search-button {
    height: 40px;
    width: 80px;
    padding: 0 10px;
    border: 2px solid #007bff;
    border-left: none;
    border-radius: 0 5px 5px 0;
    background-color: #007bff;
    color: white;
    font-size: 15px;
    cursor: pointer;
    box-sizing: border-box;
    outline: none; 
}

.search-button:hover {
    background-color: #0056b3;
}
.grid-item {
    justify-content: center;
    font-size: 14px;
    border: 2px solid;
    border-radius: 5px;
    border-color: #F5F5F5;
}
.grid-item img{
    width: 100%;
    border-radius: 5px;
}
.grid-item div{
    padding: 5px 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 17px;
}
@media (max-width: 799px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 800px) and (max-width: 999px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
    .search-container {
        padding: 100px 20px 10px 20px;
    }
}
@media (min-width: 1000px) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr);
    }
    .search-container {
        padding: 100px 20px 10px 20px;
    }
}
.pagination {
    margin-top: 20px;
    text-align: center;
    height: 60px;
    font-size: 14px;
}
.pagination input {
    width: 15px;
    height: 18px;
    text-align: center;
}
.pagination span {
    width: 20px;
    height: 20px;
    padding: 0px 5px;
}
.pagination a {
    color: #007bff;
    padding: 4px 8px;
    text-decoration: none;
    transition: background-color .3s;
}
.pagination a.active {
    background-color: #007bff;
    color: white;
}
.pagination a:hover:not(.active) {
    background-color: #f2f2f2;
}
a {
    text-decoration: none;
    color: #1E90FF;
}
a:visited {
    color: #1E90FF;
}
a:hover {
    text-decoration: underline;
}
a:active {
    color: #FF4500;
}

/* 悬浮的向上箭头按钮样式 */
.floating-button-bottom-right {
    position: fixed; /* 使用fixed定位使按钮悬浮在视口上 */
    bottom: 20px;    /* 距离视口底部10px */
    right: 20px;     /* 距离视口右边10px */
    width: 30px;     /* 按钮的宽度 */
    height: 30px;    /* 按钮的高度 */
    background-color: #28a745; /* 按钮背景色 */
    color: #fff;         /* 按钮文字颜色 */
    border: none;       /* 去掉按钮边框 */
    border-radius: 50%; /* 圆形按钮 */
    display: flex;      /* 使用flex布局以中心对齐SVG图标 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    cursor: pointer;    /* 鼠标悬停时显示为手指形状 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
    z-index: 1000;      /* 确保按钮在其他元素之上 */
}

.floating-button-bottom-right svg {
    width: 24px; /* SVG图标的宽度 */
    height: 24px; /* SVG图标的高度 */
}

.floating-button-bottom-right:hover {
    background-color: #218838; /* 悬停时改变背景色 */
}
