/**
 * 图像生成样式
 */

.generated-images-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.generated-images-container h3 {
    margin-top: 0;
    color: #333;
}

.image-item {
    display: inline-block;
    margin: 10px;
    text-align: center;
    position: relative;
}

.image-item img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.image-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 图像操作按钮 */
.image-buttons {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

.image-action-btn {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.image-action-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* 图像模态框样式 */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.image-info {
    margin: 10px 0;
    font-size: 16px;
    color: #333;
    text-align: center;
}

.modal-bottom-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.modal-action-btn {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.modal-action-btn:hover {
    background-color: #45a049;
}

.modal-action-btn.save-btn {
    background-color: #2196F3;
}

.modal-action-btn.save-btn:hover {
    background-color: #1976D2;
}

.modal-action-btn.new-tab-btn {
    background-color: #FF9800;
}

.modal-action-btn.new-tab-btn:hover {
    background-color: #F57C00;
}

/* 聊天界面中的图像显示样式 */
.generated-images-in-chat {
    margin-top: 15px;
}

.chat-image-item {
    display: inline-block;
    margin: 10px 5px;
    text-align: center;
}

.chat-image-item img {
    max-width: 200px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.chat-image-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .generated-images-container {
        padding: 15px;
    }
    
    .image-item {
        display: block;
        margin: 15px 0;
    }
    
    .image-item img {
        max-width: 100%;
    }
    
    .chat-image-item img {
        max-width: 150px;
    }
    
    .image-modal-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .modal-bottom-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .modal-action-btn {
        width: 100%;
    }
}