body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lantinghei SC', 'Microsoft YaHei', Arial, sans-serif;
    /*font-family: 'Microsoft YaHei Light', Arial, sans-serif; !* 使用微软雅黑细体 *!*/
}

header {
    background-color: #ffffff;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #e7e7e7;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0; /* 确保初始位置 */
    transition: left 0.3s;
}

.title_text {
    font-size: 30px;
    margin: 0;

}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-image: url('../images/avatar.png'); /* Replace with the actual avatar image URL */
    background-size: cover;
    background-position: center;
    position: absolute;
    right: 20px;
}

.menu-icon {
    cursor: pointer;
    width: 30px;
    height: 30px;
    background-image: url('../images/menu.png'); /* Replace with the actual menu icon URL */
    background-size: cover;
    background-position: center;
    position: absolute;
    left: 20px;
}

.sidebar {
    width: 200px;
    height: 100vh;
    background-color: #ffffff;
    position: fixed;
    top: 0;
    left: -220px; /* 默认不突出来 */
    transition: left 0.3s;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding-top: 100px;
    padding-left: 10px;
}

.sidebar.visible {
    left: 0;
}

.menu-list {
    margin-top: 20px;
    width: 100%; /* 调整为整个菜单宽度 */
    text-align: left;
}

.menu-item {
    margin-left: 10px;
    padding: 10px 0;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block; /* 调整为块级元素 */
}

.menu-item a {
    text-decoration: none; /* 移除默认下划线 */
    color: inherit; /* 继承父级颜色 */
    position: relative; /* 设置相对定位 */
}

.menu-item a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px; /* 距离文案的距离 */
    width: 140px; /* 下划线宽度为整个菜单宽度 */
    height: 1px;
    background-color: black; /* 下划线颜色 */
    transition: width 0.3s; /* 添加过渡效果 */
}

.menu-item:hover a::after {
    width: 165px; /* 鼠标悬停时，将下划线收缩为0 */
}

.content {
    position: relative;
    margin-left: 0;
    transition: margin-left 0.3s;
    background-color: #f1f1f1;
    height: calc(100vh - 80px);
    overflow-y: auto;
    margin-top: 80px; /* Adjust for header height */
}

.content.shifted {
    margin-left: 210px;
}

.main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.main_center {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* 添加相对定位 */
}

.main_center_left {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.main_right_up {
    width: 15%;
    height: 100%;
    padding-top: 20px;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1; /* 确保在上层 */
}
.main_preview_up{
    position: absolute; /* 绝对定位用于根据父容器设置宽高 */
    width: 100%;
    height: 90%;
    display: flex;
    justify-content: center;
    margin-bottom: 10%;
    align-items: end;

}
.img_model{
    border-radius: 10px;
    height: 20%; /* 图片高度100%，撑满父容器 */
    aspect-ratio: 3 / 4; /* 宽高比 3:4 */
    object-fit: inherit;
    margin-right: 40px;
    box-shadow: 2px 2px 6px 0 rgba(0, 0, 0, 0.5); /* 垂直右向下45度的2px阴影 */
}
.img_result{
    border-radius: 10px;
    aspect-ratio: 3 / 4.3; /* 宽高比 3:4 */
    height: 72%; /* 图片高度100%，撑满父容器 */
    object-fit: inherit;
    box-shadow: 4px 10px 15px 0 rgba(0, 0, 0, 0.5); /* 垂直右向下45度的2px阴影 */
}

.img_cloth{
    border-radius: 10px;
    object-fit: inherit;
    margin-left: 40px;
    aspect-ratio: 3 / 4; /* 宽高比 3:4 */
    height: 20%; /* 图片高度100%，撑满父容器 */
    box-shadow: 2px 2px 6px 0 rgba(0, 0, 0, 0.5); /* 垂直右向下45度的2px阴影 */
}

.main_preview_bottom{
    height: 18%;
    align-self: end;
    margin-bottom: 4%;
    aspect-ratio: 6 / 1; /* 宽高比 3:4 */
    box-shadow: 4px 8px 6px 3px rgba(0, 0, 0, 0.1); /* 垂直右向下45度的2px阴影 */
    border-radius: 50% / 50%; /* 创建椭圆形 */
}



.brand-text {
    margin-left: 10px;
    font-size: 16px;
    color: grey; /* 调整品牌颜色为灰色 */
}
.button {
    min-width: 60px;
    display: inline-block;
    padding: 8px 28px;
    font-size: 0.9em;
    color: white;
    background-color: black;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
}

.selection-group {
    margin-top: 4px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.selection-group img,
.selection-group .placeholder {
    width: 20%;
    aspect-ratio: 1/1.2;
    margin: 0 10px;
    border-radius: 6px;
    object-fit: inherit;
}

.selection-group .placeholder {
    border: 2px dashed #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #999;
}

.main_right_up_title{
    font-size: 14px;
    color: #333333;
}


.main_bottom {
    width: 100%;
    height: 18%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    position: relative;
    padding-bottom: 20px;
    overflow: hidden;
}

.scroll-content {
    display: flex;
    height: 100%;
    margin-top: 20px;
    padding-left: 80px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}
.scroll-content::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

.item {
    height: 80%;
    aspect-ratio: 1/1.2;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    font-size: 10px;
    font-family: 'Lantinghei SC', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}


.item img {
    height: 86%;
    aspect-ratio: 1/1.2;
    border-radius: 6px;
}
.item a{
    color: black;
    margin-top: 6px;
    text-decoration: underline;
    text-underline-offset: 2px; /* 调整下划线距离文本的距离 */
    text-decoration-skip-ink: auto; /* 控制下划线跳过文本中的字符轮廓 */
}

.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1;
}

.scroll-button.left {
    left: 4px;
}

.scroll-button.right {
    right: 4px;
}

.scroll-button svg {
    width: 24px;
    height: 28px;
    fill: #333;
}

/* Modal container */
.modal {
    display: none; /* 隐藏默认 */
    position: fixed; /* 固定位置 */
    z-index: 10; /* 位于顶层 */
    left: 0;
    top: 0;
    padding-top: 20px;
    width: 100%; /* 全宽 */
    height: 100%; /* 全高 */
    overflow: auto; /* 如果需要，启用滚动 */
    background-color: rgba(0,0,0,0.8); /* 黑色背景，透明度 0.8 */
}

/* Modal Content (image) */
.modal-content {
    margin: auto;
    display: block;
    height: 95vh; /* 高度为屏幕高度的95% */
    width: auto; /* 宽度自动 */
    border-radius: 10px; /* 圆角 */
}

/* Caption of Modal Image (Image Text) - Optional */
.modal-caption {
    margin: auto;
    display: block;
    width: 95%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Add Animation - Zoom in the Modal */
.modal-content, .modal-caption {
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

/* The Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 20px; /* 调整为30px */
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 添加鼠标悬停时的指针样式 */
.img_model, .img_result, .img_cloth {
    cursor: zoom-in; /* 鼠标悬停时显示可放大图标 */
}

/* Add this CSS at the end of the file */
.selected {
    border: 2px solid black;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */
    z-index: 9998; /* 比弹窗 z-index 小一点，使其位于弹窗之下 */
}
.alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 30px;
    background-color: #333;
    color: #fff;
    border-radius: 4px;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s;
    text-align: center;
}

.alert p {
    margin-bottom: 10px;
}

.alert button {
    padding: 4px 30px; /* 调整按钮的上下内边距 */
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.alert button:hover {
    background-color: #45a049;
}

.blur {
    filter: blur(5px);
    transition: filter 0.3s ease; /* 添加过渡效果 */
}

/* 适配移动端 */
@media only screen and (max-width: 720px) and (max-height: 1280px){
    .header{
        height: 42px;
    }
    .img_result {
        aspect-ratio: 3 / 4.3; /* 宽高比 3:4 */
        height: auto; /* 图片高度100%，撑满父容器 */
        width: 35%; /* 图片宽度调整为100% */
        align-self: end;
        object-fit: cover; /* 确保图片保持其长宽比并覆盖容器 */
        margin-bottom: 16%;
    }
    .img_model, .img_cloth {
        height: auto;
        width: 14%;
        max-width: 100%;
        aspect-ratio: 3 / 4; /* 宽高比 3:4 */
        object-fit: cover;
        align-self: end;
        margin-bottom: 16%;
    }
    .main_preview_bottom{
        height: 18%;
        aspect-ratio: 3.8 / 1; /* 宽高比 3:4 */
        margin-bottom: 14%;
        align-self: end;
    }

    .main_preview_up {
        position: absolute;
        width: 100%;
        height: 95%;
        display: flex;
        justify-content: center;
        align-items: center;

    }
    .item {
        height: 80%;
        aspect-ratio: 1 / 1.4;
    }

    .modal-content {
        display: block;
        width: 90%;
        height: auto;
    }
    .main_right_up {
        width: 65%;
        height:auto;
        padding-top: 20px;
        border-radius: 4px;
        top: 0;
        z-index: 1;
    }
    .selection-group img, .selection-group .placeholder {
        width: 14%;
        aspect-ratio: 1 / 1.2;
        margin: 0 10px;
        border-radius: 6px;
        object-fit: inherit;
    }
    .selection-group {
        margin-top: 4px;
        display: flex;
        align-items: center;
        align-self: center;
        margin-bottom: 20px;
    }
    .button {
        min-width: 15%;
        display: inline-block;
        padding: 8px 28px;
        font-size: 0.9em;
        color: white;
        background-color: black;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }
    header {
        background-color: #ffffff;
        height: 52px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-bottom: 1px solid #e7e7e7;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        transition: left 0.3s;
    }
    .title_text {
        font-size: 20px;
        margin: 0;
    }
    .content {
        position: relative;
        margin-left: 0;
        transition: margin-left 0.3s;
        background-color: #f1f1f1;
        height: calc(100vh - 80px);
        overflow-y: auto;
        margin-top: 52px;
    }
}