/* AI换发型界面样式 */
.ai-hairstyle-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #ffffff;
}

.hairstyle-header {
    text-align: center;
    margin-bottom: 40px;
}

.hairstyle-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.hairstyle-header p {
    font-size: 16px;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.hairstyle-upload-area {
    background: #f8fafc;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.upload-box {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    border: 2px dashed #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-box:hover {
    border-color: #4ECDC4;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.15);
}

.upload-box.has-image {
    border-color: #4ECDC4;
    border-style: solid;
}

.upload-content {
    text-align: center;
    width: 100%;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.upload-content h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.upload-content p {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 14px;
}

.upload-btn {
    background: linear-gradient(135deg, #4ECDC4, #2ecc71);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.image-preview {
    position: relative;
    max-width: 100%;
    margin-top: 20px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.image-preview:hover .image-overlay {
    opacity: 1;
}

.change-btn {
    background: #ffffff;
    color: #2c3e50;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-btn:hover {
    background: #f1f3f4;
}

.generate-section {
    text-align: center;
    margin-bottom: 40px;
}

.generate-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.generate-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s infinite linear;
    display: none;
}

.generate-btn.loading .btn-text {
    opacity: 0;
}

.generate-btn.loading .btn-loading {
    display: block;
}

.tip-text {
    margin-top: 15px;
    color: #7f8c8d;
    font-size: 14px;
}

/* 发型模板样式 */
.hairstyle-templates {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hairstyle-templates h3 {
    text-align: center;
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.template-tip {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 14px;
}

.template-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.template-item {
    background: transparent;
    border-radius: 12px;
    padding: 0;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    flex: 1;
    max-width: 240px;
}

.template-item:hover .template-image {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.15);
}

.template-item.selected .template-image {
    border: 3px solid #4ECDC4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.template-image {
    position: relative;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 3/4;
}

.template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.template-item:hover .template-overlay {
    opacity: 1;
}

.select-template-btn {
    background: #4ECDC4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-template-btn:hover {
    background: #2ecc71;
    transform: scale(1.05);
}

.template-item h4 {
    font-size: 16px;
    color: #2c3e50;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.template-item p {
    font-size: 13px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.3;
}

.result-section {
    text-align: center;
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.result-section h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 600;
}

.result-image {
    margin-bottom: 30px;
}

.result-image img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn, .regenerate-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.download-btn {
    background: linear-gradient(135deg, #4ECDC4, #2ecc71);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.regenerate-btn {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
}

.regenerate-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-hairstyle-container {
        padding: 20px 15px;
    }
    
    .hairstyle-header h2 {
        font-size: 24px;
    }
    
    .hairstyle-upload-area {
        padding: 20px;
    }
    
        .upload-section {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
    }
    
    .upload-box {
        aspect-ratio: 3/4;
        padding: 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .generate-btn {
        padding: 14px 30px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn, .regenerate-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .template-grid {
        flex-direction: column;
        gap: 15px;
    }
    
    .template-item {
        max-width: none;
        margin: 0;
    }
    
    .hairstyle-templates {
        padding: 20px;
        max-width: 400px;
    }
    

}

@media (max-width: 480px) {
    .hairstyle-header h2 {
        font-size: 20px;
    }
    
    .hairstyle-header p {
        font-size: 14px;
    }
    
    .upload-content h3 {
        font-size: 18px;
    }
    

    
    .template-item h4 {
        font-size: 14px;
    }
    
    .template-item p {
        font-size: 12px;
    }
} 