* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 新增渐变动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 添加装饰性元素 */
.decoration {
    position: fixed;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* 添加更多动态装饰元素 */
.dynamic-bg {
    position: fixed;
    z-index: -1;
    opacity: 0.08;
    pointer-events: none;
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.dynamic-bg-1 {
    top: 20%;
    left: 15%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #feca57, transparent);
    animation-delay: 2s;
}

.dynamic-bg-2 {
    bottom: 30%;
    right: 20%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #ff9ff3, transparent);
    animation-delay: 4s;
    animation-direction: reverse;
}

.dynamic-bg-3 {
    top: 60%;
    left: 25%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #48dbfb, transparent);
    animation-delay: 6s;
}

.dynamic-bg-4 {
    bottom: 20%;
    left: 10%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #54a0ff, transparent);
    animation-delay: 8s;
    animation-direction: reverse;
}

.decoration-1 {
    top: 10%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #ff6b6b, transparent);
    animation: float 6s ease-in-out infinite;
}

.decoration-2 {
    bottom: 15%;
    right: 8%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #4ecdc4, transparent);
    animation: float 8s ease-in-out infinite reverse;
}

.decoration-3 {
    top: 40%;
    right: 15%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #ffe66d, transparent);
    animation: float 7s ease-in-out infinite;
}

.decoration-4 {
    bottom: 30%;
    left: 10%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, #a8e6cf, transparent);
    animation: float 9s ease-in-out infinite reverse;
}

/* 添加页脚 */
.support-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    margin: 40px auto;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out;
    position: relative;
    z-index: 1;
}

/* PC端左右布局 */
@media (min-width: 1024px) {
    .support-section {
        max-width: 800px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        gap: 50px;
        padding: 30px;
    }
    
    .support-content {
        flex: 1;
    }
    
    .support-section h3 {
        text-align: left;
    }
    
    .support-qrcode {
        flex-shrink: 0;
        margin-top: 0;
        padding: 15px;
    }
    
    .support-qrcode .qrcode-img {
        width: 400px;
        height: 400px;
        display: block;
        max-width: none !important;
    }
}

.support-section h3 {
    font-size: 1.8rem;
    color: #ff6b9d;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: center;
}

.support-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.support-qrcode {
    display: inline-block;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px;
    border: 2px solid #ff6b9d;
}

.support-qrcode:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.qrcode-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
}

/* 长按保存提示样式 */
.save-hint {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
    opacity: 0.8;
}

.qrcode-text {
    font-size: 1.2rem;
    color: #ff6b9d;
    margin-top: 25px;
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: white;
    font-weight: 500;
    margin-top: 40px;
    font-size: 1rem;
    animation: fadeIn 1s ease-out;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}



@keyframes twinkle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff6b9d 0%, #feca57 25%, #ff9ff3 50%, #54a0ff 75%, #5f27cd 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.4;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.slogan {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 15px 0;
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.8), 0 0 20px rgba(255, 217, 61, 0.6), 0 2px 5px rgba(0, 0, 0, 0.4);
    animation: glow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(255, 217, 61, 0.8), 0 0 20px rgba(255, 217, 61, 0.6), 0 2px 5px rgba(0, 0, 0, 0.4);
    }
    to {
        text-shadow: 0 0 15px rgba(255, 217, 61, 1), 0 0 30px rgba(255, 217, 61, 0.8), 0 0 40px rgba(255, 217, 61, 0.5), 0 2px 5px rgba(0, 0, 0, 0.4);
    }
}

main {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: visible;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

main::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 40%;
    height: 100%;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), transparent);
    border-radius: 50%;
    z-index: 0;
}

main::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 30%;
    height: 80%;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.1), transparent);
    border-radius: 50%;
    z-index: 0;
}

section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

section h2 {
    color: #ff6b9d;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

section h2::before {
    content: '✨';
    font-size: 1.2rem;
    animation: twinkle 1.5s ease-in-out infinite;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #ff6b9d;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(255, 248, 248, 0.8);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.15), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: #feca57;
    background-color: #fff5e6;
}

.upload-area.dragover {
    border-color: #feca57;
    background-color: #fff5e6;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(254, 202, 87, 0.3);
}

.upload-icon {
    width: 60px;
    height: 60px;
    color: #ff6b9d;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

.upload-content p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #555;
}

.file-name {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}

/* 预览区域样式 */
.preview-container {
    position: relative;
    margin-bottom: 20px;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.change-image-btn {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(254, 202, 87, 0.1));
    color: #ff6b9d;
    border: 2px solid #ff6b9d;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.15);
}

.change-image-btn:hover {
    background: linear-gradient(135deg, #ff6b9d, #feca57);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ffe6e6;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff8f8;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #ff6b9d;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15);
    transform: translateY(-2px);
    background-color: white;
}

/* 生成按钮样式 */
.generate-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #feca57 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.generate-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.loading {
    text-align: center;
    margin-top: 30px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    animation: fadeIn 0.5s ease-out;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #ff6b9d;
    font-weight: 600;
    font-size: 1.1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

/* 示例展示区域 */
.examples-section {
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    overflow: visible;
}



.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.example-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float 3s ease-in-out infinite;
    overflow: hidden;
}

.example-item:nth-child(2) {
    animation-delay: 0.5s;
}

.example-item:nth-child(3) {
    animation-delay: 1s;
}

.example-item:nth-child(4) {
    animation-delay: 1.5s;
}

.example-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.example-image {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.example-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.example-item:hover .example-img {
    transform: scale(1.05);
}

.example-item p {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

/* 结果展示区域 */
.result-section {
    margin: 30px 0 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

/* 结果展示样式 - 优化为3张图片布局 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    justify-items: center;
}

/* 针对3张图片的优化 */
@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.result-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.result-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.result-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.result-item:hover img {
    transform: scale(1.05);
}

/* PC端宽屏布局 */
@media (min-width: 1024px) {
    header h1 {
        font-size: 3.5rem;
    }
    
    /* 双列布局：上传区域和信息区域并排 */
    .form-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: start;
    }
    
    .upload-section, .info-section {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    
    /* 生成按钮区域 */
    .generate-section {
        grid-column: 1 / -1;
        text-align: center;
        padding: 25px 0;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }
    
    /* 结果网格 */
    .result-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .result-item img {
        height: 280px;
    }
}



/* 移动端布局 */
@media (max-width: 767px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 30px 15px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    main {
        padding: 20px;
        border-radius: 15px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        width: 50px;
        height: 50px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .result-item {
        border-radius: 12px;
    }
    
    .result-item img {
        height: 250px;
    }
    
    .generate-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
    }
    
    .examples-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .example-item {
        padding: 15px;
    }
    
    .example-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    section h2 {
        font-size: 1.3rem;
    }
    
    .generate-btn {
        padding: 12px 24px;
        font-size: 1.1rem;
    }
}