/* 壁纸创建区域样式 */
.wallpaper-creator {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 20px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.wallpaper-creator h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 400;
    color: #6c5648;
    margin-bottom: 20px;
}

/* 模板选择 */
.template-options {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.template {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 10px 20px;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(169, 158, 139, 0.2);
}

.template span {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #8a7a6d;
}

/* 模板预览 */
.template-preview {
    width: 100%;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
}

.beige-preview {
    background-image: url('https://i.ibb.co/zhm8GDb6/Chat-GPT-Image-2025-4-24-17-02-07.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.purple-preview {
    background-image: url('https://i.ibb.co/RGxCyq8P/Chat-GPT-Image-2025-4-24-17-16-05.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.green-preview {
    background-image: url('https://i.ibb.co/gZj3SQ1r/Chat-GPT-Image-2025-4-24-17-05-05.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.template.selected {
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 3px 8px rgba(169, 158, 139, 0.1);
    transform: translateY(-2px);
}

/* 壁纸预览区域 */
.wallpaper-preview {
    width: 100%;
    padding-top: 0; /* 移除固定的纵横比 */
    position: relative;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(169, 158, 139, 0.1);
    transition: all 0.3s ease;
    min-height: 300px;
    max-height: 400px;
    background-size: cover !important;
    background-position: center !important;
}

/* 为了截图效果，让背景图片完全展示 */
.capturing .wallpaper-preview {
    overflow: visible;
    box-shadow: none;
}

/* 预览背景图片 */
.wallpaper-preview.beige {
    background: url('https://i.ibb.co/zhm8GDb6/Chat-GPT-Image-2025-4-24-17-02-07.png') no-repeat center center;
    background-size: cover;
}

.wallpaper-preview.purple {
    background: url('https://i.ibb.co/RGxCyq8P/Chat-GPT-Image-2025-4-24-17-16-05.png') no-repeat center center;
    background-size: cover;
}

.wallpaper-preview.green {
    background: url('https://i.ibb.co/gZj3SQ1r/Chat-GPT-Image-2025-4-24-17-05-05.png') no-repeat center center;
    background-size: cover;
}

.wallpaper-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 装饰元素 */
.decoration {
    position: absolute;
    opacity: 0.15;
    transition: all 0.3s ease;
}

.artistic .decoration {
    opacity: 0.3;
}

.decoration.top-left {
    top: 20px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #6c5648;
}

.decoration.top-right {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: 1px solid #6c5648;
    border-radius: 50%;
}

.decoration.bottom-left {
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border: 1px solid #6c5648;
    border-radius: 50%;
}

.decoration.bottom-right {
    bottom: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #6c5648;
}

.decoration.middle-left {
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #6c5648;
}

.decoration.middle-right {
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #6c5648;
}

.decoration.top-center {
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #6c5648;
}

.decoration.bottom-center {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #6c5648;
}

/* 预览文本 */
.preview-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    line-height: 1.5;
    font-weight: 400;
    color: #5a4839;
    text-align: center;
    width: 90%;
    max-width: 600px;
}

.dreamy .preview-text {
    font-style: italic;
}

.artistic .preview-text {
    font-weight: 500;
    letter-spacing: 1px;
}

/* 紫色背景下的文本颜色应为白色，增加可读性 */
.purple .preview-text {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 下载按钮 */
.download-button {
    display: block;
    margin: 20px auto;
    padding: 12px 25px;
    background-color: #6c5648;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-button:hover {
    background-color: #5a4839;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(169, 158, 139, 0.3);
}

/* 壁纸尺寸选择 */
.wallpaper-size-options {
    margin-bottom: 20px;
    text-align: center;
}

.size-label {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #6c5648;
}

.size-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.size-option {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-option:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

.size-option input[type="radio"] {
    display: none;
}

.size-option input[type="radio"]:checked + .size-name {
    font-weight: 500;
}

.size-name {
    font-size: 0.9rem;
    color: #6c5648;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .template-options {
        flex-direction: column;
        align-items: center;
    }
    
    .template {
        width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .wallpaper-preview {
        padding-top: 75%; /* 4:3 比例，移动设备更适合 */
    }
    
    .preview-text {
        font-size: 1.2rem;
    }
    
    .decoration {
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    .template {
        padding: 10px;
    }
    
    .template-preview {
        height: 80px;
    }
    
    .wallpaper-preview {
        padding-top: 100%; /* 1:1 比例，小屏幕上更容易查看 */
    }
    
    .preview-text {
        font-size: 1rem;
        width: 85%;
    }
    
    .size-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .size-option {
        width: 100%;
    }
} 