/* 整体布局 */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
}

.container {
    max-width: 1400px;
    width: 90%;
    padding: 50px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 250, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    margin-top: 50px;
    margin-bottom: 50px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2); /* 增加阴影强度 */
    background-color: #fff; /* 调整容器背景色为白色 */
}

.title {
    background: linear-gradient(45deg, #8e44ad, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleGlow 2s infinite alternate; /* 添加标题动画效果 */
}

@keyframes titleGlow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    to {
        text-shadow: 2px 2px 10px rgba(142, 68, 173, 0.8); /* 更强烈的文本阴影 */
    }
}

.subtitle {
    background: linear-gradient(45deg, #9b59b6, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 22px;
    margin-bottom: 40px;
    font-weight: 500;
    animation: subtitleGlow 2s infinite alternate; /* 添加副标题动画效果 */
}

@keyframes subtitleGlow {
    from {
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    }
    to {
        text-shadow: 1px 1px 8px rgba(155, 89, 182, 0.8); /* 更强烈的文本阴影 */
    }
}

/* 选项卡 */
.tab-links {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    display: flex;
    justify-content: center;
    border-bottom: 3px solid #ddd;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #ddd; /* 增加选项卡边框 */
    border-radius: 20px; /* 增大选项卡圆角半径 */
}

.tab-links li {
    margin: 0 30px;
    padding: 15px 30px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    transition: border-bottom 0.3s ease, color 0.3s ease, transform 0.3s ease;
    border-radius: 20px; /* 增大选项卡元素的圆角半径 */
}

.tab-links li.active {
    border-bottom: 3px solid #e74c3c;
    color: #e74c3c;
    background-color: #f9f9f9; /* 选中时的背景色 */
}

.tab-links li:hover {
    color: #e74c3c;
    transform: translateY(-3px);
    background-color: #f0f0f0; /* 鼠标悬停时的背景色 */
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 图片容器 */
.image-container {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 50px;
    align-items: flex-start;
    background-color: #f9f9f9;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2); /* 增加阴影强度 */
    border: 2px solid #ddd; /* 增加边框 */
}

.upload-image_1,
.upload-image_2,
.generated-image {
    text-align: center;
    background-color: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 30%;
    transition: transform 0.3s ease;
    border: 2px solid #ddd; /* 增加边框 */
    display: flex; /* 新增，使用 flex 布局 */
    flex-direction: column; /* 新增，垂直排列子元素 */
    align-items: center; /* 新增，让子元素水平居中 */
}

.upload-image_1:hover,
.upload-image_2:hover,
.generated-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3); /* 增强阴影效果 */
}

/* 自定义上传区域样式 */
.upload-container {
    width: 100%; /* 修改为 100%，让容器宽度自适应父元素 */
    height: 450px;
    border: 2px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin: auto; /* 新增，让容器在父元素中水平居中 */
}

.upload-container .plus-sign {
    font-size: 80px;
    color: #ccc;
    transition: color 0.3s ease;
}

.upload-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 15px;
    transition: transform 0.3s ease;
    border: none; /* 新增，去除图片边框 */
}

.upload-container img:hover {
    transform: scale(1.1);
    border: none; /* 新增，去除悬停时的边框 */
}

.upload-container:hover .plus-sign {
    color: #e74c3c;
}

/* 生成图片样式调整 */
.generated-image img {
    max-width: 100%; /* 确保图片宽度不超过容器宽度 */
    max-height: 450px; /* 限制图片最大高度，可根据实际情况调整 */
    object-fit: contain; /* 保持图片比例，完整显示在容器内 */
    border-radius: 15px; /* 保持圆角样式 */
    transition: transform 0.3s ease;
}

.generated-image img:hover {
    transform: scale(1.1);
}

/* 自定义上传区域样式 */
.upload-container {
    width: 100%; /* 修改为 100%，让容器宽度自适应父元素 */
    height: 450px;
    border: 2px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin: auto; /* 新增，让容器在父元素中水平居中 */
}

.upload-container .plus-sign {
    font-size: 80px;
    color: #ccc;
    transition: color 0.3s ease;
}

.upload-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 15px;
    transition: transform 0.3s ease;
    border: none; /* 新增，去除图片边框 */
}

.upload-container img:hover {
    transform: scale(1.1);
    border: none; /* 新增，去除悬停时的边框 */
}

.upload-container:hover .plus-sign {
    color: #e74c3c;
}

/* 示例图片 */
.examples_1,
.examples_2 {
    margin-top: 40px;
    text-align: center;
}

.example-images {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.example-column {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #ddd; /* 增加边框 */
}

.example-img {
    width: 200px;
    height: 300px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-right: 20px;
    object-fit: cover;
    border: 2px solid #ddd; /* 增加边框 */
}

.example-img:last-child {
    margin-right: 0;
}

.example-img:hover {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    border: 2px solid #e74c3c; /* 鼠标悬停时改变边框颜色 */
}

/* 按钮样式 */
button,
.generate-button {
    padding: 15px 30px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; /* 增加阴影过渡效果 */
}

button:hover,
.generate-button:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* 鼠标悬停时增加阴影效果 */
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to right, #8e44ad, #f1c40f); /* 渐变背景 */
    border-radius: 30px; /* 更大的圆角 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* 更强的阴影 */
    padding: 15px 30px;
    margin-bottom: 30px;
    gap: 20px;
    animation: toolbarFadeIn 0.5s ease-out; /* 淡入动画 */
}

@keyframes toolbarFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toolbar input[type="radio"] {
    display: none;
}

.toolbar label {
    cursor: pointer;
    padding: 15px 35px; /* 更大的内边距 */
    font-size: 20px; /* 更大的字体 */
    font-weight: 600; /* 更粗的字体 */
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.8); /* 半透明白色背景 */
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative; /* 为伪元素做准备 */
    overflow: hidden; /* 隐藏溢出的伪元素 */
}

.toolbar label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.toolbar label:hover::before {
    transform: scaleX(1);
}

.toolbar input[type="radio"]:checked + label {
    background: linear-gradient(to right, #e74c3c, #f39c12); /* 选中时的渐变背景 */
    color: white;
    box-shadow: 0 8px 15px rgba(231, 76, 60, 0.3);
    transform: translateY(-5px); /* 上移更多 */
}

.toolbar input[type="radio"]:checked + label::before {
    display: none; /* 选中时隐藏伪元素 */
}

.toolbar label:hover {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

/* 自定义上传区域样式 */
.upload-container {
    width: 300px;
    height: 450px;
    border: 2px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.upload-container .plus-sign {
    font-size: 80px;
    color: #ccc;
}

.upload-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-container img {
    max-width: 100%;
    max-height: 100%;
}