/* 顶部导航栏 */
.body{
    margin: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    position: relative;
}

/* 登录图标样式 */
.top-bar .login img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    cursor: pointer;
    display: block;
}

/* 站点注释（header 左侧） */
.top-bar .site-note {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    color: #a9a9a9;
    font-size: 20px;
    font-weight: 500;
}
.top-bar .site-note div:last-child {
    color: #a9a9a9;
    font-size: 20px;
    font-weight: 500;
}
/* 检索条件可视化展示区域 */
.search-visual {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin: 0 auto 0; /* 增加顶部间距，使其与上方部件距离更远 */
    width: 80%;
    height: 950px;
    /* background-color: #f5f5f5; */
    border-radius: 10px;
    padding: 20px 0;
    gap: 16px;
    position: relative; /* 使后代绝对定位相对于此容器 */
}
/* .right-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
} */
/* Logo图片样式 */
.logo {
    width: 100%;
    margin-top: 60px;
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 5;
}
.logo img {
    width: auto;
    max-width: 800px;
    max-height: 160px;
    height: auto;
    object-fit: contain;
}

/* 删除按钮样式 - 移动到书本图片内部右下角 */
.delete-button {
    /* 与 .condition-images 并列，靠右显示 */
    position: static;
    width: 120px;
    height: 120px;
    border: none;
    background-color: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 20px; /* 与 .condition-images 保持间距 */
    z-index: 10;
    transform: translateY(50px); /* 向下移动 50px */
}
.delete-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 搜索按钮容器 - 移动到书本图片下方 */
.search-button-container {
    width: 80vw;
    display: flex;
    justify-content: center;
    margin-top: -80px;
}

/* 搜索按钮样式 - 改为长条图片 */
.search-button {
    width: 80vw;
    max-width: 750px;
    height: 150px;
    margin-top: 50px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.search-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.delete-button img:hover,
.search-button img:hover {
    transform: scale(1.1);
}
.search-display {
    width: 100%;
    max-width: 1500px;
    min-height: 500px;
    margin-top: -50px; /* 上移并与 logo 重叠约 10px */
    z-index: 1; /* logo 在上层 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../icon/function/bookcolourless.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    box-sizing: border-box;
}

/* 左侧占位：与 .delete-button 宽度相同的无交互空间，使 .condition-images 视觉居中 */
.search-display::before {
    content: "";
    display: block;
    width: 120px; /* 与 .delete-button 宽度保持一致 */
    flex: 0 0 120px;
    pointer-events: none;
}

/* 6个特征布局*/
.condition-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 25px; /* 增大间距，使格子分开些 */
    width: 70%;
    max-width: 500px; /* 可按需调整 */
    aspect-ratio: 3 / 2;
    margin-top: -70px;
    justify-items: center;
    align-items: center;
}

/* 图标格子，占个位 */
.condition-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f6f2de; /* 米色底色 */
    border-radius: 45px; /* 圆角 */
    overflow: hidden; /* 保证内部内容遵循圆角 */
    box-sizing: border-box;
    /* padding: 10px; */
}
/* 选中的 condition-image 里的小图标 */
.condition-icon {
    width: 150px;
    height: 150px;
    border-radius: 45px;
    object-fit: contain;
}


/* 检索条件选择区域 */
.search-options {
    width: 1000px;
    margin: -150px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0; /* 紧贴页面底部 */
}

/* 分类选择（上部） */
.category {
    display: flex;
    justify-content: space-around;
    width: 80%;
    height: 250px;
    align-items: center;
    position: relative;
}

/* 每个分类项 */
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

/* 外层容器：包裹 icons-container 和 site-footer，使二者宽度一致且背景为白色 */
.icons-wrapper {
    width: 100%;
    box-sizing: border-box;
    background-color: #FFFFFF;
    /* 仅保留上方圆角，下方取消，使底部平直贴合页面 */
    border-radius: 50px 50px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 40px 30px 0 30px;
    margin-bottom: 0; /* 紧贴页面底部 */
}



/* 圆形图标 */
.circle-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: white;
    /* border: 2px solid #ccc; */
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* 确保图片不会超出圆形区域 */
}

/* 图片样式 */
.circle-icon img {
    width: 80%;
    /* 调整图片大小 */
    height: 80%;
    object-fit: contain;
    /* 保持图片比例 */
    transition: opacity 0.3s ease;
}


/* 选中时切换图片 */
.category-item.selected .circle-icon img {
    opacity: 0;
    /* 隐藏未选中状态的图片 */
}

.category-item.selected .circle-icon::after {
    content: "";
    display: block;
    width: 140px;
    height: 140px;
    background-image: var(--selected-image);
    /* 使用 CSS 变量动态设置选中图片 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
}

/* 动态设置选中图片 */
.category-item[data-category="cover"].selected .circle-icon::after {
    --selected-image: url('../icon/function/color2nd.png');
}

.category-item[data-category="character"].selected .circle-icon::after {
    --selected-image: url('../icon/function/character2nd.png');
}

.category-item[data-category="location"].selected .circle-icon::after {
    --selected-image: url('../icon/function/location2nd.png');
}

.category-item[data-category="time"].selected .circle-icon::after {
    --selected-image: url('../icon/function/time2nd.png');
}

/* 文字 */
.category-item span {
    margin-top: 10px;
    font-size: 32px;
    color: #0058d7;
    font-weight: bold;
}

/* 图标网格区域（下部） */

.icons-container {
    width: 100%;
    position: relative;
    background-color: #FFFFFF;
    border: none;
    border-radius: 0;
    padding: 12px 0 0 0;
    box-sizing: border-box;
    display: block;
    height: 362px;
    overflow-x: hidden;
    overflow-y: auto; /* 单个系列内垂直滚动 */
    scroll-behavior: smooth;
    touch-action: pan-y;
    overscroll-behavior: contain;
}



.icons-container::-webkit-scrollbar {
    width: 8px;
}
.icons-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 1px;
}
.icons-container::-webkit-scrollbar-track {
    background-color: transparent;
}
.icons-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


/* 图标网格布局 */
.icons-grid {
    display: none;
    grid-template-columns: repeat(6, 1fr); /* 每行 6 个 */
    grid-auto-rows: 150px; /* 行高 */
    gap: 10px 10px;
    width: 100%;
    /* padding: 24px 40px; */
    box-sizing: border-box;
    align-items: start;
    justify-items: center;
}

.icons-grid.is-active {
    display: grid;
}

/* 每个系列占据容器宽度，方便横向滚动切换 */
.icons-grid[data-category="cover"] {
    /* 行高与 gap 与主规则保持一致：3 行 + 2 个间隙 */
    min-height: calc(3 * 150px + 2 * 10px);
    align-content: start; /* 空位在下方，图标靠上 */
}



/* 单个图标样式 */
.icon {
    width: 135px;
    height: 135px;
    background: #ffffff;
    /* border: 2px solid transparent; */
    border-radius: 45px;
    transition: transform 0.2s ease-in-out, border-color 0.15s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon img{
    width: 120px;
    height: 120px;
    border-radius: 45px;
}

/* 单独为白色封面图标添加灰色外框 */
.icon.icon--white {
    border: 6px solid #d0d0d0;
    box-sizing: border-box;
}
/* 选中时的缩放效果 */
.icon:hover {
    transform: scale(1.1);
}

/* 选中时添加边框 */
.icon.selected {
    border: 10px solid #0058d7; /* 选中时为蓝色 */
}


.site-footer {
    background-color: #FFFFFF;
    color: rgb(186, 186, 186);
    padding: 0px 10px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 45px;
    width: 100%;
    /* border-top: 4px solid #FED104; */
    text-align: center;
}

.site-footer .footer-content p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .search-button img {
        width: 250%; /* 在移动端宽度设置为 200% */
    }
}
